using System.Collections.Generic;
public static void Main()
""posx"": ""-46.688962875"",
""posy"": ""-23.632046625""
""posx"": ""-46.773388125"",
""posy"": ""-23.68939025""
var tracking = JsonConvert.DeserializeObject<Tracking>(json);
Console.WriteLine("Hour: " + tracking.Hour);
Console.WriteLine("Vehicles:");
foreach (Vehicle veh in tracking.Vehicles)
Console.WriteLine(" Prefix: " + veh.Prefix);
Console.WriteLine(" Position: (" + veh.Position.X + ", " + veh.Position.Y + ")");
Console.WriteLine(new string('-', 50));
string json1 = JsonConvert.SerializeObject(tracking, Formatting.Indented);
Console.WriteLine(json1);
[JsonProperty(PropertyName = "hr")]
public string Hour { get; set; }
[JsonProperty(PropertyName = "vs")]
public IList<Vehicle> Vehicles { get; set; }
[JsonProperty(PropertyName = "pre")]
public string Prefix { get; set; }
public Position Position { get; set; }
[JsonProperty(PropertyName = "posx")]
get { return Position != null ? Position.Y : null; }
if (Position == null) { Position = new Position(); }
[JsonProperty(PropertyName = "posy")]
get { return Position != null ? Position.X : null; }
if (Position == null) { Position = new Position(); }
public string Y { get; set; }
public string X { get; set; }