Archive

Posts Tagged ‘json’

How to Pretty Print JSON with Gson and Jackson

May 20th, 2015 No comments

In my last article, I compared two leading JSON APIs in Java: Jackson and Gson. If you have tried the samples there, you may have noticed that the two samples print the JSON string into one line. While it’s pretty efficient for machine, it may not easy for human consumption when the Json string is long. Sometimes I have to copy a long Json string into an editor to find out what are there.

Categories: Software Development Tags: ,

Gson vs Jackson: Which to Use for JSON in Java

March 27th, 2015 7 comments

There are many JSON libraries for Java. While it’s nice to have many options, it can also be frustrating to decide which one to use. If you do an online search, you will find many opinions and all these libraries are used somewhere. When in doubt, the best thing to do is: stop searching and start coding. It doesn’t take long to get the ultimate answer for you.

Categories: Uncategorized Tags: , , ,