samedi 18 avril 2015

Spring RestTemplate jackson fetch particular field

I have the following JSON in my android application and I'm using Springs for android RestTemplate. Is it somehow possible to fetch only internal list from this json ? Currently I have to create a wrapper object and then I can fetch List<Cast> casts; from it - it's a bit inconvenient.



{
"id": 550,
"cast": [
{
"cast_id": 4,
"character": "The Narrator",
"credit_id": "52fe4250c3a36847f80149f3",
"id": 819,
"name": "Edward Norton",
"order": 0,
"profile_path": "/iUiePUAQKN4GY6jorH9m23cbVli.jpg"
}
]
}

Aucun commentaire:

Enregistrer un commentaire