0
让我从一个JSON对象开始喜欢独特的分JSON对象
[
{
"id": 32837732,
"composer": {
"id": 536,
"name": "Francis Poulenc"
},
"title": "Of Thee I Sing: Overture (radio version)"
},
{
"id": 32837735,
"composer": {
"id": 245,
"name": "George Gershwin"
},
"title": "Concerto in F : I. Allegro"
},
{
"id": 32837739,
"composer": {
"id": 245,
"name": "George Gershwin"
},
"title": "Concerto in F : II. Adagio"
}
]
是有可能得到,用C#,LINQ中,在干净的,声明的方式,一个JSON像
{
'composer': [
{
'id': '536',
'name': 'Francis Poulenc'
},
{
'id': '245',
'name': 'George Gershwin'
},
]
}
这是一个JSon对象,每个作曲者(id和name)都有唯一的子值吗? 感谢所有。
谢谢!我能够将您的代码适应我的“真实”情况,并且完美地工作! –