The solution in Gson is a similar annotation called @SerializedName, which can be used to provide names that match the original JSON.
A simple example is shown below:
public class Message {
@SerializedName("ID")
private String id;
@SerializedName("NFd")
private int fileDescriptors;
}
Source
source
share