I just implemented this in RestSharp. This post was helpful to me.
Besides the code in the link, here is my code. I now get a Dictionary
of results when I do something like this:
var jsonClient = new RestClient(url.Host);jsonClient.AddHandler("application/json", new DynamicJsonDeserializer());var jsonRequest = new RestRequest(url.Query, Method.GET);Dictionary<string, dynamic> response = jsonClient.Execute<JObject>(jsonRequest).Data.ToObject<Dictionary<string, dynamic>>();
Be mindful of the sort of JSON you're expecting - in my case, I was retrieving a single object with several properties. In the attached link, the author was retrieving a list.