how can I deserialize the ff json string:
{"stock":[{"name":"stock1","price":{"currency":"AUD","amount":103.50},"percent_change":-1.33,"volume":1583760,"symbol":"SC1"}],"as_of":"2016-06-10T15:20:00+08:00"}
I've tried the code:
JsonConvert.DeserializeObject<stock>(content);
where content variable is the json string above. However I am getting null value of the properties.
Here are my classes:
public class price
{
public string currency { get; }
public double amount { get; }
}
public class stock
{
public string name { get; }
public price price { get; }
public double percent_change { get; }
public int volume { get; }
public string symbol { get; }
}
Thank you in advance!