Question by
MobinYaqoob · Mar 15, 2016 at 08:04 AM ·
c#unity 5jsonlitjson
Nested Dictionary to JSON by LitJson
For the simplicity of my problem i create a simple scenio i have a dictionary within Dictionary so i want to convert it into json . Simple Dictionary works fine for just JsonMapper.ToJson(simpleDictioary); but for nested it gives error. So How to convert a nested dictioary in to JSON.
Dictionary<string,Dictionary<int,string>> dd =
new Dictionary<string, Dictionary<int, string>>();
dd.Add("Main",new Dictionary<int, string>
{
{1,"Nested"}
});
dicJson = JsonMapper.ToJson(dd);
Comment
Your answer
Follow this Question
Related Questions
WebClient Errors when using WebClient. 1 Answer
How to read a nested Array Json File in unity 3d? 0 Answers
Unity for each JSONnode in JSONObject 0 Answers
Json doesnt work in android (unity) 0 Answers
Refresh Chat room messages 1 Answer