{
"id":"123", "result":
{
"0": { "children_id": "0", "name": "some name" },
"1": { "children_id": "1", "name": "some other name" }
}
}
I have this pice of JSON string, how i can deserialize it using: JSON.NET http://json.codeplex.com ?
I was trying make some class which can hold my json object, but i i don't know how i can hold this "0" and "1".
public class Data
{
public string children_id { get; set; }
public string name { get; set; }
}
public class RootObject
{
public string id { get; set; }
public List<Data> result { get; set; }
}
new System.Web.Script.Serialization. JavaScriptSerializer().Deserialize(string)
? – Rosdi Kasim Jun 21 at 17:19