我正在尝试使用此对象创建一个类的List
:
{
"801": {
"Name": "SomeWhere",
"Lanes": {
"2": {
"Ip": "172.23.101.21"
},
"4": {
"Ip": "172.23.101.41"
},
"6": {
"Ip": "172.23.101.61"
},
"8": {
"Ip": "172.23.101.81"
},
"9": {
"Ip": "172.23.101.91"
},
"11": {
"Ip": "172.23.101.111"
}
}
},
"803": {
"Name": "OverThere",
"Lanes": {
"3": {
"Ip": "172.23.103.31"
},
"6": {
"Ip": "172.23.103.61"
}
}
}
}
我需要它能够像这样使用它:List<ClassOfJson> jsonData = new List<ClassOfJson>();
我在C#中使用Newtonsoft
。
您能帮我吗?谢谢。
答案 0 :(得分:2)
您可以尝试在Visual Studio中使用Edit->Paste Special->Paste JSON as classes