Tag Archives | json

How to convert Java Object to / from JSON (Using Gson)

In this article, you will see how to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object. Gson is an open-source project hosted athttp://code.google.com/p/google-gson Add the following dependencies in pom.xml 1. Create POJO Create Person Class as following. 2. Convert to JSON [...]

Continue Reading ... Comments { 0 }