0

このように、Web APIからのJSON応答があります

{"payload":{"items":{"11204":{"title":"The Ugliest Girl?","item_id":"11204","thumb_url":"http:google.11204.jpg","teaser":"We live in the internet generationher purpose in life to her through this adversity.","language_id":"en","media_id":1,"views":"5","shares":"0"},"11228":{"title":"Depressed","item_id":"11228","thumb_url":"http:google.11228.jpg","teaser":"We all get discouraged at times, especially when things go wrong or other people hurt us. Sometimes we can seem to go through a string of disappointments that compound our sadness till we wonder.","language_id":"en","media_id":5,"views":"35","shares":"2"}} 

および同様の方法でさらに多くのオブジェクト

これを Dictionary またはその他の方法で解析するにはどうすればよいですか? リクエストによって対応が異なります。

4

2 に答える 2

0

あなたのjsonを次のようなオブジェクトに解析できます:

var parsed = JObject.Parse(Json);

特定の値を取得するには:

var value = parsed[key];
于 2013-08-06T10:40:22.497 に答える