{
"id": "007",
"name": "James Bond",
"missions": [{
"year": "2006",
"title": "Casino Royale"
},
{
"year": "2008",
"title": "Quantum of Solace"
},
{
"year": "2012",
"title": "Skyfall"
},
{
"year": "2015",
"title": "Spectre"
}]
}
答案 0 :(得分:0)
看看这个: https://components.xamarin.com/view/json.net
有了这个Libary,它真的很容易
您可以反序列化:
JamesBondObject oResult = (JamesBondObject) JsonConvert.DeserializeObject(sResponse, typeof( JamesBondObject ) );
class JamesBondObject {
int id;
string name;
Mission[] missions;
}
class Mission {
int year;
string title;
}