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 is not correctly parsed to XML when a key is "content" #407

Closed
LukeButters opened this issue Mar 9, 2018 · 1 comment
Closed

JSON is not correctly parsed to XML when a key is "content" #407

LukeButters opened this issue Mar 9, 2018 · 1 comment

Comments

@LukeButters
Copy link

LukeButters commented Mar 9, 2018

It seems when trying to parse json with key of "content" e.g.

"content":{foo: "bar"}

means something special, where it just encodes the entire value of "content" into one XML element.
this is done at:
https://github.com/stleary/JSON-java/blob/master/XML.java#L601

A comment exists saying:

// Emit content in body

Which doesn't explain why.

Why is it doing this? Can it be disabled or at least can we have option to disable it?

@stleary
Copy link
Owner

stleary commented Mar 9, 2018

This is an open issue tracked by #394. A fix has been proposed and accepted in principle. Please continue the discussion in that issue.

@stleary stleary closed this as completed Mar 9, 2018
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