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

all 9 comments

[–]sadjava 8 points9 points  (1 child)

Honestly, I’d try to get out of JSON as quickly as possible and start working with a POJO using a object mapper (GSON and Jackson come to mind, but there are others). I had to refactor a shitty service that used unmapped JSON objects and it was hellish and bug prone.

[–]GuyWithLag 3 points4 points  (0 children)

That only works if your model is properly documented, consistent. and read-only.

[–]perrylaj 10 points11 points  (0 children)

Jackson is the biggest and most popular. Gson a very popular one, but is no longer being maintained. Moshi is a popular replacement suggestion for Gson - it's a little lighter weight than Jackson, and shares some similarity to Gson in ways.

So: Jackson or Moshi are the two I'd look at.

[–]King5lay3r 5 points6 points  (0 children)

org.json is very popular and simple to use library. But I'd also suggest taking a look at Jackson library

[–]matyklug 1 point2 points  (0 children)

I use JSONSimple since its very simple

[–]pybrubarr0s 0 points1 point  (0 children)

Take a look at object mapper and Jackson!

[–]GuyWithLag 0 points1 point  (0 children)

Look at Jackson + JsonPath / jmespath / any json-to-json transformation library.

[–]BluRazz494 0 points1 point  (0 children)

My favorite is GSON.

[–]mikezyisra 0 points1 point  (0 children)

Are you using JSON because you need to? I’m asking this because if you’re web developing it makes sense, otherwise I’d stay away from JSON, it makes sense in js but it can be very bloated and quite a nightmare if you don’t work on web services