[
{
"Name": "广东智能科技股份有限公司",
"Child": [
{
"Field": "\\广东智能科技股份有限公司\\测试",
"Url": "http://192.168.0.252/k3cloud",
"ACName": "广东金蝶云星空",
"ACid": "65881debbdabd9",
"User": "admini2",
"Pwd": "QQQQ
*=",
"Note": ""
},
{
"Field": "",
"Url": "http://192.168.0.252/k3cloud",
"ACName": "广东金蝶云星空1",
"ACid": "65881debbdabd9",
"User": "admini2",
"Pwd": "QQQQ*=",
"Note": ""
}
]
},
{
"Name": "广东智能科技股份有限公司2",
"Child": [
{
"Field": "",
"Url": "http://192.168.0.252/k3cloud",
"ACName": "广东金蝶云星空21",
"ACid": "65881debbdabd9",
"User": "admini2",
"Pwd": "FFFFF*=",
"Note": ""
},
{
"Field": "",
"Url": "http://192.168.0.252/k3cloud",
"ACName": "广东金蝶云星空22",
"ACid": "65881debbdabd9",
"User": "admini2",
"Pwd": "QQQQQ*=",
"Note": ""
}
]
}
]
cs
dynamic jsonObject = JsonConvert.DeserializeObject(SysString);
foreach (dynamic x in jsonObject)
{
TreeNode rootNode = new TreeNode($"{ x.Name}");
MainTree.Nodes.Add(rootNode);
foreach (dynamic y in x.Child)
{
TreeNode childNode = new TreeNode($"{y.ACName}");
rootNode.Nodes.Add(childNode);
}