摘要:
using System.Web.Script.Serialization; public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; List<Product> products = new List<Product>(){ new Product(){Name="苹果",Price=5.5}, new Product(){Name="橘子",Pr... 阅读全文
摘要:
C#将Json字符串反序列化成List对象类集合usingSystem.IO;usingSystem.Web.Script.Serialization;usingSystem.Runtime.Serialization.Json;publicstaticList<T> JSONStringToList<T>(thisstringJsonStr){JavaScriptSerializerSerializer =newJavaScriptSerializer();List<T> objs = Serializer.Deserialize<List<T 阅读全文