反序列化一个object var str1 = "{id:1,name:'111',x:[1,2,3],y:{a:'ssss',b:'dddd'}"; var obj1 = JsonConvert.DeserializeAnonymousType(str1, new {id=1,name="1",x=new[]{1,2},y=new{a="1",b="b"}}); 反序列化一个数组 var str2 = "[{id:
摘自:http://blog.csdn.net/cdefg198/article/details/7520398 using System.IO; using System.Web.Script.Serialization; using System.Runtime.Serialization.Json; public static List<T> JSONStringToList<T>(this string JsonStr) { JavaScriptSerializer Ser