标签:提取 研究 color text json ring image parse 嵌套
string jsonText = "{‘name‘:‘test‘,‘phone‘:‘18888888888‘,‘image‘:[{‘name‘:‘img1‘,‘data‘:‘data1‘},{‘name‘:‘img2‘,‘data‘:‘data2‘},{‘name‘:‘img3‘,‘data‘:‘data3‘}]}"; JObject jo = (JObject)JsonConvert.DeserializeObject(jsonText); string zone = jo["name"].ToString(); string zone_en = jo["phone"].ToString(); JArray jar = JArray.Parse(jo["image"].ToString()); MessageBox.Show(zone); MessageBox.Show(zone_en); for (var i = 0; i < jar.Count; i++) { JObject j = JObject.Parse(jar[i].ToString()); MessageBox.Show(j["name"].ToString()); MessageBox.Show(j["data"].ToString()); }
标签:提取 研究 color text json ring image parse 嵌套
原文地址:http://www.cnblogs.com/shadowme/p/6250116.html