Response 1:
{
"id": "85",
"email": "jack@test.com",
"profession": [
{
"category_id": "1",
"name": "ARTIST"
}
],
"genre": [
{
"category_id": "3",
"name": "ROCK"
}
],
"instruments": "No list has found",
}
Response 2:
{
"id": "85",
"email": "jack@test.com",
"profession": [{
"category_id": "1",
"name": "ARTIST"
}],
"genre": [{
"category_id": "3",
"name": "ROCK"
}],
"instruments": [{
"category_id": "3",
"name": "ROCK"
}],
}
In first response instruments key have a String value, In second response instruments have a array. create the pojo class for second response but some times i got first response also it move OnFailure . how can i handle in Retrofit.