我通过asp.net中的http post收到了以下json:
{
"Header": {
"MCC": "415",
"F0": "0",
"REG ID": "0"
},
"Contacts": [
{
"name": "jocelyne",
"mo": "jocelyne"
},
{
"name": "eliane",
"mo": "12345678"
}
]
}
我只需要将联系人下的数据放在数据表中,并将标题下的数据反序列化为 3 个变量...
我试过这个:
Dim deserializedProduct As List(Of Dictionary(Of String, String)) = JsonConvert.DeserializeObject(Of List(Of Dictionary(Of String, String)))(json)
和这个:
Dim table As DataTable = JsonConvert.DeserializeObject(Of DataTable)(json)
我尝试使用这个json:
{
"Data": [
{
"MCC": "415",
"F0": "0",
"REG ID": "0"
}
],
"Contacts": [
{
"name": "jocelyne",
"mo": "jocelyne"
},
{
"name": "eliane",
"mo": "12345678"
}
]
}
但这些都不起作用......