I'm consuming an API where the data response comes like this :
[{"requester":"5"},{"requester":["5","2"]},{"requester":null}]
So I'm using retrofit and this is my response model :
public class ResponseModel
{ private String assigned;
public String getRequester()
{ return requester;
}}
But I didn't know how the response model should be because as you see the same JSON property("requester") can come as a string or as an array if there is only one requester the requester hold only one value as a string but if there is more than one it comes back as an Array and if there is no requester at all it comes back null .
I didn't know how I should do this, hope you can help me with it, appreciate any help!