Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

10 Example of Gson in Java - JSON tutorial

10 Example Of Gson In Java - JSON Tutorial
The Gson library is a gift from Google to Java developers. It provides the simplest but powerful mechanism to deal with Json documents in Java. By using Gson library, you can parse JSON String to generate Java objects, serialize a Java object to create a JSON document. You can even pretty print JSON String by setting some option to the Gson class, which is the main helper class to interact with Gson library. It also provides mechanism to deal with nulls e.g. you can include null on JSON String or you can omit them. By default Gson print JSON in compact format where null fields are not exported to JSON document but null within array and list are exported. 


This post first appeared on Javarevisited: Blog About Java Programmin, please read the originial post: here

Share the post

10 Example of Gson in Java - JSON tutorial

×

Subscribe to Javarevisited: Blog About Java Programmin

Get updates delivered right to your inbox!

Thank you for your subscription

×