c# - How to Parse JSON data which is not in a "name:value" format? -


I am getting some JSON data that is not in "name: value" pair, but something like this:

  [["manager id \", \ "employee id \", \ "domain \"], [\ "2 \", \ "110 \", \ "BBU \"] ]  

I am not able to parse this code using JsonConvert.DeserializeObject as I get an error

< P> "To fix this error, either JSON for a JSON object (like {" name ":" value "}) or in an array The deserialized type changes or implements a collection interface (such as Icons, ILIITs), such that the list can be deserialized from a JSON array, in JSN Erettubate to also apply it to deserialize from a JSON array The path can be added, line 1, position 1. "

I am using Visual Studio 2008 and .NET. Frame 3.5 If you need more clarification please let me know.

  class MyObject {public ent registrar ID {receives; Set; } Public InteractiveIID {Received; Set; } Public string domain {get; Then your JSON does not match, your JSON should look like this:  
  {"ManagerID": 2, "EmployeeID" : 110, "domain": "bbs"}  

If you really want to read the JSON above, then you need it:

  JsonConvert DeserializeObject & lt; String [] []> (YourString); Tried  

  Newtonsoft Jason Jason Convert. Directoryal Object & lt; String [] []> ("[[" ["Manager id \", "employee \", \ "domain \"], [\ "2 \", \ "110 \", \ "BBU \"]]))  

But this is not an easy structure ...


Comments