Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
get nested json object with gson using retrofit
get nested json object with gson using retrofit ¬†using -'java,android,json,gson,retrofit'
I'm consuming an API from my android app, and all the JSON responses are like this:
¬†¬†¬†¬†'reason': 'Everything was fine',
¬†¬†¬†¬†¬†¬†¬†¬†¬†< 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?
Oct 23, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening