Hello all!
I am quite happy using GSON and its default serializer.
Here my inheritance structure:
public class Reply{
private int code;
}
public class ConcreteReply extends Reply{
private String concreteStr;
}
By default it serialized into following JSON
: { "concreteStr":"value", "code":0 }
Firstly fields of child object and then super object
How to reverse this order?
In this example I want to achieve following result:
{ "code":0, "concreteStr":"value" }