c# json转Dictionary字典

 JavaScriptSerializer s = new JavaScriptSerializer();

  string jsonTexts = "{\"count\":\"5550\",\"status\": \"200\",\"message\": \"success\",\"show_data\":[{\"productsId\":\"10025\",\"productName\":\"粉色波点裙蕾丝帽子熊 00190009\",\"discountPrice\":\"98.00\",\"defaultPrice\":\"null\",\"frontImg_160_160\":\"http://img.chaotianmen.com/upload/productimg/20140310/1403101454563877026_160_160.jpg\",\"frontImg\":\"http://img.chaotianmen.com/upload/productimg/20140310/1403101454563877026.jpg\",\"totalSales\":\"1\",\"shopName\":\"喜洋洋精品儿童玩具专卖店\"},{\"productsId\":\"10026\",\"productName\":\"粉色波点裙蕾丝帽子熊 00190009\",\"discountPrice\":\"98.00\",\"defaultPrice\":\"null\",\"frontImg_160_160\":\"http://img.chaotianmen.com/upload/productimg/20140310/1403101454563877026_160_160.jpg\",\"frontImg\":\"http://img.chaotianmen.com/upload/productimg/20140310/1403101454563877026.jpg\",\"totalSales\":\"1\",\"shopName\":\"喜洋洋精品儿童玩具专卖店\"}]}";
 
Dictionary<string, object> JsonData = (Dictionary<string, object>)s.DeserializeObject(jsonTexts);

 

posted @ 2016-05-05 13:40  D调灬仔  阅读(15188)  评论(0编辑  收藏  举报

作者D调灬仔

出处:https://www.cnblogs.com/chj929555796/

如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!