开发者

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜