Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve raw content in $text node #2

Open
2 tasks
parzhitsky opened this issue Sep 30, 2021 · 2 comments
Open
2 tasks

Preserve raw content in $text node #2

parzhitsky opened this issue Sep 30, 2021 · 2 comments
Labels
Change: minor [Issue / PR] describes a non-breaking change, such as adding a new functionality Domain: main [Issue / PR] describes change in the functionality, its optimization Pending: blocked [Issue / PR] cannot be addressed until another issue is resolved Priority: medium [Issue / PR] should be addressed without delay Type: improvement [Issue / PR] addresses lack of a functionality or an open possibility of enhancement

Comments

@parzhitsky
Copy link
Member

parzhitsky commented Sep 30, 2021

xml2json configured to automatically parse data to values (numbers, booleans, etc., falling back to strings). This means:

  • remove this configuration of xml2json and parse values manually (ideally, preserving xml2json's parsing logic);
  • save raw unparsed strings in $text property;
@parzhitsky parzhitsky added Change: minor [Issue / PR] describes a non-breaking change, such as adding a new functionality Domain: main [Issue / PR] describes change in the functionality, its optimization Priority: medium [Issue / PR] should be addressed without delay Type: improvement [Issue / PR] addresses lack of a functionality or an open possibility of enhancement labels Sep 30, 2021
@parzhitsky
Copy link
Member Author

parzhitsky commented Oct 4, 2021

ideally, preserving xml2json's parsing logic

Possibly extremely wasteful, but we could create two intermediate JSONs – one with raw data, and one with parsed data, – and then combine the results (data from parsed JSON comes to $data, and data from raw JSON comes to $text). That way, the third-party parsing logic would be preserved; on the other hand though, it only worsens the problem of having an intermediate processing (#1).

@parzhitsky parzhitsky added the Pending: blocked [Issue / PR] cannot be addressed until another issue is resolved label Oct 5, 2021
@parzhitsky
Copy link
Member Author

Blocked by #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Change: minor [Issue / PR] describes a non-breaking change, such as adding a new functionality Domain: main [Issue / PR] describes change in the functionality, its optimization Pending: blocked [Issue / PR] cannot be addressed until another issue is resolved Priority: medium [Issue / PR] should be addressed without delay Type: improvement [Issue / PR] addresses lack of a functionality or an open possibility of enhancement
Projects
None yet
Development

No branches or pull requests

1 participant