a few days ago I started using Retrofit instead of OkHTTP in order to comunicate with an API. Everything goes perfect but I have a doubt and I didn't found nothing clear about it.
If a have a JSON response from my API like this
{
"event": {
"status": "4",
"participants": "5.455"
},
"more_data": "string_data",
"even_more_data": 0
}
That means I should have a POJO structure like this?
public class Event {
@SerializedName("event")
public EventData data;
@SerializedName("more_data")
public String moreData;
@SerializedName("even_more_data")
public int evenMoreData;
}
public class EventData {
@SerializedName("status")
public String eventStatus;
@SerializedName("participants")
public String numberOfParticipants;
}
Is there anyway to store all this information in a single POJO?
Thanks