Custom converter for Retrofit 2
问题 I have to handle a dynamic JSON responses. Before, I was using classes and annotations as follows: public class ChatResponse { @SerializedName("status") private int status; @SerializedName("error") private String error; @SerializedName("response") private Talk response; public int getStatus() { return status; } public String getError() { return error; } public Talk getResponse() { return response; } } When the status is 1 (success) the onResponse is fired and I can get a ChatResponse object.