Hi guys, it’s me again, I’m trying to deserialize this using Restsharp Object, in a console, which I got from influxDB. Not so sure I;m doing it right. Here’s my code:
//In the main
var client = new RestClient("http://localhost:8086/query?db=lightdb&q=select * from lighting");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
//How to get the "value" which is 12 from the value column?
var light = JsonConvert.DeserializeObject<LightdDB>(response.Content);
For the object class that have been created:
public class LightdDB
{
public String statement_id { get; set; }
public List series { get; set; }
public List values { get; set; }
}
public class Series
{
public String name { get; set; }
public List<Columns> columns { get; set; }
}
public class Columns
{
public DateTime Date { get; set; }
public string Value { get; set; }
}
public class Values
{
public string date_time;
public string value;
}