1
2
3
4
5
6
7
8
// Taken from a blogpost on Scott Hanselman's blog.. we grab some JSON,
// and using the JSON.NET JObject, we can parse the response/JSON to a dynamic object 'o'

var client = new WebClient();
client.Headers.Add("User-Agent", "Nobody");
var response = client.DownloadString(new Uri("http://www.hanselman.com/smallestdotnet/json.ashx"));
JObject o = JObject.Parse(response);'
//Now o is an object I can walk around...