JsonHelper帮助类库
只需要一行代码就能搞定复杂的json转换
轻松实现json序列化和json反序列化
.Net解析Json字符串帮助类源码下载
JsonHelper.cs类库源码
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.Script.Serialization; namespace Helper { public class JsonHelper { /// <summary> /// json反序列化 /// </summary> /// <param name="input"></param> /// <returns></returns> public static object jsonDes<T>(string input) { JavaScriptSerializer jss = new JavaScriptSerializer(); return jss.Deserialize<T>(input); } /// <summary> /// json序列化 /// </summary> /// <param name="obj"></param> /// <returns></returns> public static string json(object obj) { JavaScriptSerializer jss = new JavaScriptSerializer(); return jss.Serialize(obj); } } }