Json序列化

 

Dictionary<string, string> map数据 = new Dictionary<string, string>();

map数据.Add("诊断结果", "无");

JavaScriptSerializer jss = new JavaScriptSerializer();

string strJSON = jss.Serialize(map数据);

 

JavaScriptSerializer jss = new JavaScriptSerializer();
Dictionary<string, object> mapData = new Dictionary<string, object>();
mapData = jss.Deserialize<Dictionary<string, object>>(strJosn);

posted @ 2019-04-30 17:26  青竹月印  阅读(148)  评论(0编辑  收藏  举报