Simple custom mapping of JSON property to object property with Retrofit
问题 What is the simplest way to define a custom mapping of a JSON property to a particular object property in RetroFit? Example JSON response for a set of "rewards": [ { "name" : "$5 Voucher", "description" : "Get $5 off your next purchase", "assets" : { "icon" : "icon.png" } } ] Reward class in my Android project: public class Reward { @SerializedName("name") private String name; @SerializedName("description") private String description; @SerializedName("icon") private String icon; } Because