Is it possible to use retrofit without model class?

前端 未结 5 1162
时光说笑
时光说笑 2021-01-02 02:38

i have problem to use model class in retrofit lib. A backend side field name has changed.

Is it possible to get response without model class?

5条回答
  •  萌比男神i
    2021-01-02 03:04

    You can simply "rename" field on your side using

    @SerializedName("newFieldName")
    SomeClass oldField;
    

提交回复
热议问题