Unity Json解析

.NET 库: Newtonsoft.Json

下载地址:http://www.newtonsoft.com/json

引入:using Newtonsoft.Json;

Json 转 Dictionary:

string json = "{'test','123'}";

Dictionary dic= JsonConvert.DeserializeObject>(json);

Dictionary 转 Json:

Dictionary dic = new Dictionary();

dic.Add("test","123");

string json = JsonConvert.SerializeObject(dic);

你可能感兴趣的:(Unity Json解析)