【发布时间】:2011-08-22 21:13:07
【问题描述】:
我有这种 JSON 格式:
string jsonFormat = @"{
""Applications"": {
""data"": {
""Application named one"": [
{
""index"" : ""1"",
""name"" : ""One"",
""active"" : ""1"",
""excluded"" : ""false""
}
],
""Application named two"": [
{
""index"" : ""2"",
""forum"" : ""yes"",
}
]
}
}
}";
我如何才能访问 datachilds ?我需要检索 Application named one 和 Application named two - 对于每个属性及其值 - 属性因应用程序而异。
到目前为止,我有:
JObject resultt= JObject.Parse(jsonFormat);
// get JSON result objects into a list
IList<JToken> results = resultt["Applications"]["data"].Children().ToList();
我查看了 JSON.net 文档,但找不到解决方案...
任何帮助都会非常有用。谢谢。
【问题讨论】:
-
我就是找不到工作......
标签: json windows-phone-7 json.net deserialization