System.Web.Script.Serialization.JavaScriptSerializer jss = new System.Web.Script.Serialization.JavaScriptSerializer(); 序列化 //将序列化成json格式后日期(毫秒数)转成日期格式 function ChangeDateFormat(cellval) { var date = new Date(parseInt(cellval.replace…
C#将对象序列化成JSON字符串 public string GetJsonString() { List<Product> products = new List<Product>(){ new Product(){Name="苹果",Price=5.5}, new Product(){Name="橘子",Price=2.5}, new Product(){Name="干柿子",Price=16.00} }; Produ…