我有以下结构:
获取手册:
//要求
{
"type": "handbook",
"hash": ""
}
//回复
{
"body": {
"songs": [
{
"id": 1,
"length": 1231,
"name": "song 1"
},
{
"id": 2,
"length": 3155,
"name": "song 2"
}
],
"setlists": [
{
"id": 1,
"name": "setlist1",
"songs": [
{
"id": 1
},
{
"id": 2
}
]
},
{
"id": 2,
"name": "set list 2",
"songs": [
{
"id": 3
},
{
"id": 4
},
{
"id": 5
}
]
}
]
},
"state": true,
"type": "handbook"
}
我需要一个解决两个问题的建议:1)如何在响应的“主体”中映射对象?2) 我如何将 Setlist 连接到它的歌曲?