- Home /
JsonFX deserialize nested Json
Hi people,
I'm using JsonFx.json and i've to deserialize some complex Json with array into array (code parts above ) :
{"id":"1","name":"Personnage 001","type":"PERS","online":"1","created":"2014-12-03 13:00:00","modified":"2014-12-03 13:00:00","go_files":
{"001-01":
{"perso_arr\u00eat0003.png":
{"root":"\/homepages\/\u00eat0003.png","**www**":"\/plugins\/lasermaths\/GAMEOBJECTS\/1\/001-01\/perso_arr\u00eat0003.png"}},
{"001-02":
{"perso_arr\u00eat0004.png":
{"root":"\/homepages\/\u00eat0004.png","**www**":"\/plugins\/lasermaths\/GAMEOBJECTS\/1\/001-01\/perso_arr\u00eat0004.png"}},
[etc .]
So i've a C# class :
public class items
{
public string id {get;set}
public string name {get;set}
public string type {get;set}
public Dictionary go_files;
}
and my deserialize method :
items[] i = JsonReader.Deserialize<items[]>(www.text);
foreach (items datas in i)
{
Debug.Log(datas.id +"/"+ datas.name +"/"+ datas.type);
foreach(var files in item.go_files)
{
Debug.Log(files.Keys);
}
}
With that i obtain my values to 001-01 and 001-02 (folders) but i'm stucked here and i don't know what to do to get the "www" value in all the json.
The point is here : i need to obtain the "www" value into each folder like "001-01".
How can access to them ?
Thank for your help.
Sebastien
Comment
Your answer

Follow this Question
Related Questions
Custom Serialization 0 Answers
JsonFx Deserialize Special Characters 1 Answer
JSON and Javascript 0 Answers
JsonFX and iOS, error when building in XCODE 0 Answers
jsonfx anomalies 0 Answers