So I can do the following new GensonBuilder().useClassMetadata(true)
and Genson will add a @Class
element to the Json Object with the class name when it serializes.
Is there any way I can have this happen only when it comes to a runtime type that is different to compile time.
E.g.
class MyType {
public MyType myType;
public Objct myType2;
}
I would expect a @Class
element on myType2
when serialized, but not myType
.