日期:2014-05-17 浏览次数:20398 次
{ status:"succeed",msg:"成功",
data:
[
{
"id":"1","name":"根目录","totalCount":12000,
child:
[
{
"id":"137","name":"服饰","totalCount":5000,
child:
[
{
"id":"140","name":"男装","totalCount":5000,
child:
[
{
"id":"141","name":"裤子","totalCount":5000
}
]
}
]
}
]
}
]
}
string value = "[{\"id\":0,\"text\":\"自定义组视图\"},{\"id\":-1,\"text\":\"所有测点\",\"iconCls\":\"ico_blank\",\"children\":";//[{\"id\":2,\"text\":\"测点1\"},{\"id\":3,\"text\":\"测点2\"},{\"id\":4,\"text\":\"测点3\"}]}]";
string children = "[";
for (int a = 0; a < spots.Rows.Count; a++)
{
if (a != spots.Rows.Count - 1)
{
children += "{\"id\":" + spots.Rows[a]["id"].ToString() + ",\"text\":\"" + spots.Rows[a]["name"] + "\"},";