日期:2014-05-16  浏览次数:20410 次

json 数据转换


string var= {"0":"行号","1":"产品编号","2":"产品描述","3":"产品单价","4":"产品数量","5":"产品总价","6":"操作"},{"0":"行号","1":"PM1003","2":"G4567-023","3":"23.00","4":"11","5":"253.00","6":"操作"},{"0":"行号","1":"PM1002","2":"G12-13","3":"12.00","4":"1","5":"12.00","6":"操作"}



网上搜了下,解析方法,不是很全,请高手赐教
------解决方案--------------------
http://www.cnblogs.com/txw1958/archive/2012/08/01/csharp-json.html
------解决方案--------------------


using System.Web.Script.Serialization;


JavaScriptSerializer jsa = new JavaScriptSerializer();
            string zz = jsa.Serialize(var);

------解决方案--------------------
用开源库Newtonsoft.Json,序列化吧,简单快速