摘要:
将DataTable或Ilist转换成JSON格式 view source print?using System; using System.Data; using System.Text; using System.Collections.Generic; using System.Reflection; /// summary /// 将DataTable或Ilist转换成JSON格式 /// /summary public class ToJson { public ToJson() { } //DataTable转成Json public static string D 阅读全文
摘要:
dhtmlXTree与json(转)2009-05-04 15:05最近才接触到dhtmlXTree,下载地址http://www.dhtmlx.com/感觉这个玩意生成树不错,粗略看了下API,其中有个loadJSONObject的方法,根据示例,只需要简单得定义Json数据对象就能很方便就能生成树://定义json数据对象var jsondata = ...{id:0, item:[...{id:1,text:"first"},...{id:2, text:"middle", item:[...{id:"21", text:"child"}]},...{id:3,text:"last"}] 阅读全文