How do I parse below Json in ASP.Net?
I'm using Json.Net.My question is:How do I parse below Json in ASP.Net?Thanks in advance.
[
{
"1":[
"Fax1",
"Fax2",
"Fax3"
]
},
{
"2":[
"SES1",
"SES2",
"SES3"
]
},
{
"3":开发者_运维问答[
"IVR1",
"IVR2",
"IVR3"
]
}
]
You may deserialize this as an array of Dictionary:
Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string,string[]>[]>(jsonData);
or alternative as List instead of arrays:
Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string,List<string>>>>(jsonData);
精彩评论