Problem
Hi, help me please to deserialize Json into a C# dictionary, where key of KeyValuePair = value of 'symbol', and 'cur' i don't want to deserialize.
My JSON
[
{
"cur": "BNT",
"symbol": "BNT/BTC",
"last": 0.00069999,
"high": 0.000725,
"low": 0.000631,
"volume": 11.83176914,
"vwap": 0.00066075,
"max_bid": 0.000725,
"min_ask": 0.000631,
"best_bid": 0.00062001,
"best_ask": 0.0007
},
{
"cur": "FST",
"symbol": "FST/BTC",
"last": 0.00000113,
"high": 0.00000136,
"low": 0.0000011,
"volume": 105727.64821274,
"vwap": 0.00000115,
"max_bid": 0.0000012,
"min_ask": 0.00000108,
"best_bid": 0.00000115,
"best_ask": 0.00000127
}
]
C#
public class SomeClass
{
Dictionary<string,Ticker> dictionary { get; set; }
}
public class Ticker
{
public decimal Last { get; set; }
public decimal High { get; set; }
public decimal Low { get; set; }
public decimal Volume { get; set; }
public decimal Vwap { get; set; }
public decimal MaxBid { get; set; }
public decimal MinAsk { get; set; }
public decimal BestBid { get; set; }
public decimal BestAsk { get; set; }
}
I think I need to use CustomCreationConverter, but i don't know how to do it :)
Thanks