摘要: 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... 阅读全文
posted @ 2012-02-29 11:14 leidc 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2012-02-29 11:07 leidc 阅读(724) 评论(0) 推荐(0) 编辑