Let’s say
Class ClassA {
String someString;
int someInt;
}
I want to serialize this object into a JSON string e.g:
{"someString" : "hello", "someInt" : 2}
and I also want to convert this back into an object of ClassA.
I have looked into the GSON library but is there a way I can use reflection or something to automatically detect class fields and convert them into beans?
Jackson is a pretty great JSON processing library. (No hate against GSON, but in my experience Jackson has been more featureful, and the lead dev is very good about addressing bugs / feature requests)