0

私は次の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 Subject Summaryを取得します

しかし、Idea セクションに ID が必要であり、これを StringBuilder に書き出す必要があります。これが理にかなっていると思いますか?

4

1 に答える 1