Use Gson to convert between JSON and Java objects
It is really a simple and fast solution to use google-gson to convert Java objects with primitives to JSON and back.
A call to new Gson().toJson(primitiveObj) is all you need.
There's also a Maven repository for easy integration in your project.
Try it out before you fiddle around with your own object converter!
A call to new Gson().toJson(primitiveObj) is all you need.
There's also a Maven repository for easy integration in your project.
Try it out before you fiddle around with your own object converter!
