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

Order of added "elements" through JSONObject.put #270

Closed
bilak opened this issue Aug 11, 2016 · 1 comment
Closed

Order of added "elements" through JSONObject.put #270

bilak opened this issue Aug 11, 2016 · 1 comment

Comments

@bilak
Copy link

bilak commented Aug 11, 2016

Currently final object (JSONObject.toString()) is not sorted in order in which it was constructed. It would be nice to have ability to store elements in order. I mean if I put first element "element2" and second "element1" I would like to see them in this order. For this it could be simple solution to change HashMap to LinkedHashMap, but I don't know if this is the right decision or if there should be one more constructor which will accept the map implementation (or some other parameters which will tell that we want to have final json in order as it was constructed). If you want I can submit PR with change from HashMap to LinkedHashMap.

@johnjaylward
Copy link
Contributor

johnjaylward commented Aug 11, 2016

This is a duplicate of #228, #210, #66, #43, and #37.

This will not be fixed.

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

3 participants