I know there are a few posts about Newtonsoft so hopefully this isn\'t exactly a repeat...I\'m trying to convert JSON data returned by Kazaa\'s API into a nice object of som
If, like me, you prefer to deal with strongly typed objects** go with:
MyObj obj = JsonConvert.DeserializeObject(jsonString);
This way you get to use intellisense and compile time type error checking.
You can easily create the required objects by copying your JSON into memory and pasting it as JSON objects (Visual Studio -> Edit -> Paste Special -> Paste JSON as Classes).
See here if you don't have that option in Visual Studio.
You will also need to make sure your JSON is valid. Add your own object at the start if it is just an array of objects. i.e. {"obj":[{},{},{}]}
** I know that dynamic makes things easier sometimes but I'm a bit ol'skool with this.