gnsb February 2016

JSON Parser recommendation: Is there a JSON Parser which maintains order?

I know a JSON that maintains order is no longer JSON, but this is a requirement in some use and throw code. I have read other hacks like replacing HashMap with LinkedHashMap in the JSONObject.java file. I was wondering if there is a parser which does this without any modifications.

Answers


ammoQ February 2016

You could use a streaming JSON parser, e.g. Jackson, which will deliver the tags as it finds it. Of course that means that you might have to change your program logic to process the JSON elements on the fly.

Post Status

Asked in February 2016
Viewed 2,865 times
Voted 8
Answered 1 times

Search




Leave an answer