Example for use gson in java, with maven
If you use neovim or some text editor, run the example with this code.
mvn clean compile exec:java
This example has how to use gson for transform a Object to a String, with json format. And has the method to transform a String with json format to Object.