I have complex json and problem getting data from it.
I need to display daily currency, but I am not sure how to get data from TimeSeriesDigitalCurrencyDaily class. TimeSeriesDigitalCurrencyDaily class can have N number of properties.
How to get rid of "__invalid_type__20171214153500 __invalid_name__2017-12-14 15:35:00" and have proper name for this and all others properties?
public class MetaData
{
public string __invalid_name__1. Information { get; set; }
public string __invalid_name__2. Digital Currency Code { get; set; }
public string __invalid_name__3. Digital Currency Name { get; set; }
public string __invalid_name__4. Market Code { get; set; }
public string __invalid_name__5. Market Name { get; set; }
public string __invalid_name__6. Interval { get; set; }
public string __invalid_name__7. Last Refreshed { get; set; }
public string __invalid_name__8. Time Zone { get; set; }
}
public class __invalid_type__20171214153500
{
public string __invalid_name__1a. price (USD) { get; set; }
public string __invalid_name__1b. price (USD) { get; set; }
public string __invalid_name__2. volume { get; set; }
public string __invalid_name__3. market cap (USD) { get; set; }
}
public class __invalid_type__20171214153000
{
public string __invalid_name__1a. price (USD) { get; set; }
public string __invalid_name__1b. price (USD) { get; set; }
public string __invalid_name__2. volume { get; set; }
public string __invalid_name__3. market cap (USD) { get; set; }
}
public class TimeSeriesDigitalCurrencyDaily
{
public __invalid_type__20171214153500 __invalid_name__2017-12-14 15:35:00 { get; set; }
public __invalid_type__20171214153000 __invalid_name__2017-12-14 15:30:00 { get; set; }
}
public class RootObject
{
public MetaData __invalid_name__Meta Data { get; set; }
public TimeSeriesDigitalCurrencyDaily __invalid_name__Time Series (Digital Currency Daily) { get; set; }
}
Json: https://www.alphavantage.co/query?function=DIGITAL_CURRENCY_DAILY&symbol=BTC&market=CNY&apikey=demo
{
"Meta Data":{
"1. Information":"Intraday Prices and Volumes for Digital Currency",
"2. Digital Currency Code":"BTC",
"3. Digital Currency Name":"Bitcoin",
"4. Market Code":"USD",
"5. Market Name":"United States Dollar",
"6. Interval":"5min",
"7. Last Refreshed":"2017-12-14 15:35:00",
"8. Time Zone":"UTC"
},
"Time Series (Digital Currency Daily)":{
"2017-12-14 15:35:00":{
"1a. price (USD)":"16306.55330865",
"1b. price (USD)":"16306.55330865",
"2. volume":"140691.10869917",
"3. market cap (USD)":"2294187064.05620003"
},
"2017-12-14 15:30:00":{
"1a. price (USD)":"16307.53476936",
"1b. price (USD)":"16307.53476936",
"2. volume":"140846.23060976",
"3. market cap (USD)":"2296854802.80179977"
}
}
}
Any suggestion, links would be great. Thanks