【发布时间】:2025-11-23 18:30:04
【问题描述】:
我的 android 应用程序中有以下 JSON,我正在使用 Springs for android RestTemplate。是否有可能从这个 json 中只获取内部列表?目前我必须创建一个包装对象,然后我可以从中获取List<Cast> casts; - 这有点不方便。
{
"id": 550,
"cast": [
{
"cast_id": 4,
"character": "The Narrator",
"credit_id": "52fe4250c3a36847f80149f3",
"id": 819,
"name": "Edward Norton",
"order": 0,
"profile_path": "/iUiePUAQKN4GY6jorH9m23cbVli.jpg"
}
]
}
【问题讨论】: