<dependency>
<groupId>io.shapeshifter</groupId>
<artifactId>json-shapeshifter</artifactId>
<version>1.0.0</version>
</dependency>
@Json
public class Person {
private String name;
private int age;
// ...
}
JsonShapeshifter jsonShapeshifter = new JsonShapeshifter();
String jsonString = jsonShapeshifter.toJson(person);
System.out.println(jsonString);
Person person = jsonShapeshifter.fromJson(jsonString, Person.class);
System.out.println(person.getName());
System.out.println(person.getAge());
25