最佳答案
I'm consuming an API from my android app, and all the JSON responses are like this:
{
'status': 'OK',
'reason': 'Everything was fine',
'content': {
< some data here >
}
The problem is that all my POJOs have a status
, reason
fields, and inside the content
field is the real POJO I want.
Is there any way to create a custom converter of Gson to extract always the content
field, so retrofit returns the appropiate POJO?