Welcome to Instant GSON. This book has been especially created to provide you with all the information that you need to get started with GSON. You will learn the basics of GSON, get started with building JSON representation, and discover some tips and tricks for coding GSON.
This book contains the following sections:
So, what is GSON? helps you find out what GSON actually is, what you can do with it, and why it's so great.
Configuring GSON in Eclipse will help you configure the GSON library in Eclipse IDE for a simple Java project and a Maven type Project.
Quick start – creating your first JSON in GSON will show you how to perform one of the core tasks of GSON: creating courses. Follow the examples discussed in this section to get started with GSON, which will be the common code of most of the GSON use.
Top 12 features you need to know about helps you learn how to perform handling generic-typed, custom serialization and field exclusion strategy. By the end of this section you will be able to:
Convert a Java object to JSON
Serialize and deserialize in GSON
Use the GSON nested classes handling mechanism
Convert a Java array to a JSON array
Handle generic-type classes while working with GSON serialization and deserialization
Handle a null object while working with GSON
Use versioning support in GSON
Use the no argument constructor support
Create a custom field name from a Java object to JSON output string
Exclude a JSON field while serializing it in GSON
People and places you should get to know provides you with many useful links to the project page and forums, as well as a number of helpful articles, tutorials, blogs, and Twitter feeds by the GSON super-contributors, as every open source project is centered around a community.