Gson ignore json field and deserialize

后端 未结 1 838
孤城傲影
孤城傲影 2021-01-14 12:17

I\'m working with android and gson and i was wondering if i can ignore a field from the webservice.

this its my gson object

Gson gson = new GsonBuil         


        
相关标签:
1条回答
  • 2021-01-14 13:00

    You can call gson.fromJson(inputString, localObject) and if localObject doesn't declare a validator variable, it will just skip it.

    0 讨论(0)
提交回复
热议问题