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

JSON to XML and back #7

Open
sgaid1 opened this issue Mar 12, 2012 · 2 comments
Open

JSON to XML and back #7

sgaid1 opened this issue Mar 12, 2012 · 2 comments

Comments

@sgaid1
Copy link

sgaid1 commented Mar 12, 2012

Hi,

I need to parse JSON to XML and back again. I didn't expected that the JSON input and the JSON output (after two parsing steps) differ form each other. The alphabetical ordering isn't an issue. The problem is, that the generated "e" from the XML appears in JSON. On one hand it is plausible, that the XML is parsed strictly to JSON without modification. On the other hand it's just irritating that the JSON changes after parsing back and forth. What is your advise for this problem? Is there already a feature implemented? Or do i need to write a parser by myself?

Thanks in advance,
Sebastian

@kra3
Copy link

kra3 commented Dec 16, 2015

I also encountered this issue; this happens mostly around JSON Arrays (only if the root object is JSONArray)

The parser needs to be changed it seems. Have you got it working, if yes please share, it could save some time. Else I'll chime in.

Following JSONs are not getting converted back as of now (on develop branch with my pull request):
{}, [], ['single_val'], [['values', 'another']]

master branch seems to have further more cases which is not working as expected.

@kra3
Copy link

kra3 commented Dec 17, 2015

These cases are now addressed ['single_val'], [['values', 'another']] with the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants