-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Preserving insertion order of keys on JSONObject #37
Comments
This has been tried. What happens is people make applications that depend on that ordering, which breaks interoperability. |
Is the order of JSON Array [] maintained when we convert from JSON to XML? |
BGehrels
pushed a commit
to BGehrels/JSON-java
that referenced
this issue
Apr 29, 2020
…ly-dirs Move files to maven friendly dirs. Hope it works...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I know that JSON keys are unordered, but this make the transformation from JSON to XML unreliable, especially if you use xsd validation on the result. I suppose that some other formats are affected too.
I think that preserve the insertion order is a good improvement, with little impact on performance.
It should be as easy as replace java.util.HashMap with java.util.LinkedHashMap on JSONObject.
Thank you very much.
Joan
The text was updated successfully, but these errors were encountered: