Gson is a Java library that can be used to convert Java Objects into their JSON representation. Gson considers both of these as very important design goals.
fromJson() methods to convert Java objects to JSON and vice-versa
Allow pre-existing unmodifiable objects to be converted to and from JSON
Extensive support of Java Generics
Support arbitrarily complex objects (with deep inheritance hierarchies and extensive use of generic types)