I\'m trying to deserialize a JSON response from an API. The JSON looks like this (MAC addresses and location are altered):
{
\"body\" : [{
\"_id\" :
It looks like you should be able to just get rid of your Measures
class. Instead, put the dictionary straight into your Body
class:
public class Body
{
public string _id { get; set; }
public Place place { get; set; }
public int mark { get; set; }
public Dictionary<string, SingleModule> measures { get; set; }
public string[] modules { get; set; }
}
As a separate matter, I'd strongly recommend following .NET naming conventions for your properties, and using [JsonProperty("measures")]
etc to indicate to Json.NET how to translate your properties into JSON.