查看原文
/// <summary> /// Converts an object to its JSON representation. /// </summary> /// <param name="obj"></param> /// <returns></returns> public static string ConvertToJson(object obj) { return new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(obj); }