将对象转化为json格式
/// <summary> /// 将对象序列化为json数据 /// </summary> private string GetToJson(object dic) { //实例化JavaScriptSerializer类的新实例 JavaScriptSerializer jss = new JavaScriptSerializer(); try { //将对象序列化为json数据 return jss.Serialize(dic); } catch (Exception ex) { throw new Exception(ex.Message); } }
补充:软件开发 , C# ,