unity3dでjsonから値を取得するためにminijsonを使用しています
レスポンスは
{"existing":[{"LastUpdated":"7\/9\/2013 4:03:57 AM","LetterSpeed":100,"Letters":"SP","NumRandom":5,"Reward":10,"ShowWordDesc":false,"ShowWordHint":false,"Sort_ID":5,"WN_Level_ID":34,"WN_Word_ID":95,"WordDesc":"","WordHint":"","zError":null},{"LastUpdated":"7\/9\/2013 4:03:57 AM","LetterSpeed":100,"Letters":"aún","NumRandom":2,"Reward":10,"ShowWordDesc":true,"ShowWordHint":false,"Sort_ID":10,"WN_Level_ID":34,"WN_Word_ID":83,"WordDesc":"still","WordHint":"","zError":null},{"LastUpdated":"7\/9\/2013 4:03:58 AM","LetterSpeed":200,"Letters":"tanto","NumRandom":3,"Reward":10,"ShowWordDesc":true,"ShowWordHint":false,"Sort_ID":20,"WN_Level_ID":34,"WN_Word_ID":84,"WordDesc":"so","WordHint":"","zError":null}]}
私が使用したコードは
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using MiniJSON;
機能中
string response = www.text;
Debug.Log(response);
IDictionary search = (IDictionary) Json.Deserialize(response);
IList tweets = (IList) search["existing"];
foreach (IDictionary tweet in tweets) {
Debug.Log(tweet["LastUpdated"]);
}
キー名がわからない場合、キーと値の両方を保存するにはどうすればよいですか?