摘要:
#region List转换成Json /// <summary> /// List转换成Json /// </summary> public static string ObjectToJson(object obj) { DataContractJsonSerializer serializer = new DataContractJsonSerializer(obj.GetType()); MemoryStream stream = new MemoryStream(); serializer.WriteObject(stream, obj); byte[] da 阅读全文
摘要:
public string Dtb2Json(DataTable dtb) { System.Web.Script.Serialization.JavaScriptSerializer jss = newSystem.Web.Script.Serialization.JavaScriptSerializer(); System.Collections.ArrayList dic = new System.Collections.ArrayList(); foreach (DataRow dr in dtb.Rows) { System.Collections.Generic.Dictiona. 阅读全文