Convert Java Object To / From JSON, GSON Example explains about converting a Java Object to JSON string, JSON string to Java Object Using Google Gson JSON library
According to Google Gson documentation, Google Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object. Gson can work with arbitrary Java objects including pre-existing objects that you do not have source-code of.
Here I am showing an example about How to convert a Java Object into JSON string and vice versa using Google Gson.
Read More :