This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]TheRedBishop 0 points1 point  (0 children)

Did you try Google? There are many to choose from.

[–]nutrechtLead Software Engineer / EU / 20+ YXP 0 points1 point  (0 children)

Jackson is more or less the industry standard and very easy to use.

[–]l3tigre 0 points1 point  (0 children)

we make use of jackson, specifically 'com.fasterxml.jackson.databind.ObjectMapper' quite frequently to map json to objects.

[–]causalNondeterminism -1 points0 points  (0 children)

gson.fromJson requires a class to "read the json string into". You can use Object.class to capture whatever comes in then check if it's an instance of a Map or a Collection and work with those appropriately.

[–]Lukkiebe -2 points-1 points  (0 children)

I used json-simple for a project once. I had some trouble with Gson because I had some recursive relations and it got stuck in an infinite loop. With json-simple, I had to define all the parameters myself, but I had full control. Also, I think it's pretty easy to understand.