Normally, if a key
doesn't exist in the response we created, Retrofit simply makes the variable null. I want to get JSONException
if the key doesn't exist or something happens against the model we created. Is there any way to achieve this ?
Asked
Active
Viewed 101 times
0

Tim
- 41,901
- 18
- 127
- 145

theapache64
- 10,926
- 9
- 65
- 108
-
you will have to create a custom JSON deserializer for that. – Vladyslav Matviienko Jan 19 '18 at 09:43
-
[This](https://stackoverflow.com/q/12813319/6413377) might be one way. – pirho Jan 20 '18 at 21:00