Please help me. Where I am missing info? I need to deserialize the following JSON string.
{"results":[{"series":[{"name":"PWR_00000555","columns":["time","last"],"values":[["1970-01-01T00:00:00Z",72]]}]}]}
For this, I have defined my class:
public class Serie
{
public Serie()
{
this.Points = new List<object[]>();
}
[JsonProperty(PropertyName = "results")]
public string results { get; set; }
[JsonProperty(PropertyName = "series")]
public string sries { get; set; }
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
[JsonProperty(PropertyName = "columns")]
public string[] ColumnNames { get; set; }
[JsonProperty(PropertyName = "values")]
public List<object[]> Points { get; set; }
But when I try using the de-serializer, it gives an exception.
{"Cannot deserialize the current JSON object (e.g. {\"name\":\"value\"}) into type 'System.Collections.Generic.List`1[InfluxDB.Serie]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.\r\nPath 'results', line 2, position 12."}