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
I like this method:
using Newtonsoft.Json.Linq;
// jsonString is your JSON-formatted string
JObject jsonObj = JObject.Parse(jsonString);
Dictionary dictObj = jsonObj.ToObject>();
You can now access anything you want using the dictObj
as a dictionary. You can also use Dictionary
if you prefer to get the values as strings.
You can use this same method to cast as any kind of .NET object.