When we define a class with following format
public class Field { @SerializedName(\"name\") public String name; @SerializedName(\"category\") pub
Use reflection to retrieve the Field object you want. You can then use Field#getAnnotation(Class) to get a SerializedName instance on which you can call value() to get the name.
Field
SerializedName
value()