Skip to content

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

@LukeButters

Description

@LukeButters

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions