我有以下json:
[
{
"Action":"Create",
"Date":"Sat, 13 Aug 2011 00:38:17 GMT",
"EventTypeName":"CommentEvent",
"FriendlyDate":"4 days ago",
"Idea":{
"Id":4479,
"AvgRatingRounded":0,
"BusinessUnitName":"Consumer: Personal Finance",
"PunchLine":"API Test idea",
"ScoreRecent":4.31,
"StatusName":"Just an idea, not working on it",
"SubmittedOn":"\/Date(1313195896000-0700)\/",
"SubmitterName":"Bryant Chou"
},
"Subject":"Idea",
"Summary":"Bryant Chou commented on idea API Test idea",
"User":{
"Id":11362,
"DisplayName":"Bryant",
"EmailWork":"Bryant@blah.com",
"Location":"",
"Phone":"650-555-5555",
"PhotoExists":true,
,
"PhotoUrl_36x36":
"http:\/\/localhost.localhost\/Files\/Tenant_1\/DirPhotos\/Small\/11362_3.jpg"
}
},
{
"Action":"Create",
"Date":"Fri, 12 Aug 2011 17:25:57 GMT",
"EventTypeName":"CommentEvent",
"FriendlyDate":"4 days ago",
"Idea":{
"Id":4477,
"AvgRatingRounded":0,
"BusinessUnitName":"Consumer: Personal Finance",
"PunchLine":"API Test idea",
"ScoreRecent":4.31,
"StatusName":"Just an idea, not working on it",
"SubmittedOn":"\/Date(1313169956000-0700)\/",
"SubmitterName":"Bryant Chou"
},
"Subject":"Idea",
"Summary":"Bryant Chou commented on idea API Test idea",
"User":{
"Id":11362,
"DisplayName":"Bryant",
"EmailWork":"Bryant@blah.com",
"Location":"",
"Phone":"650-555-5555",
"PhotoExists":true,
"PhotoUrl_36x36":
"http:\/\/localhost.localhost\/Files\/Tenant_1\/DirPhotos\/Small\/11362_3.jpg"
}
}
]
我可以用
JArray a = JArray.Parse(GetJSONPeople());
GridView1.DataSource = a;
GridView1.DataBind();
并绑定到网格,但它没有我需要的所有信息。
我得到 Action Date EventTypeName FriendlyDate 主题摘要
但是我需要Idea部分中的ID,并且需要在StringBuilder中写出来。我希望这是有道理的?