Gson how to get serialized name
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.
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.