【发布时间】:2020-12-25 04:01:17
【问题描述】:
所以我能够解析除“1d”对象之外的所有内容。
我怎样才能解析这个?
我正在使用可解码结构和 JSONDecoder/URLSession。
[
{
"id": "BTC",
"currency": "BTC",
"symbol": "BTC",
"name": "Bitcoin",
"price": "23534.92820166",
"1d": {
"volume": "35998036640.38",
"price_change": "533.60149906",
"price_change_pct": "0.0232",
"volume_change": "-15387650809.09",
"volume_change_pct": "-0.2995",
"market_cap_change": "9934352701.55",
"market_cap_change_pct": "0.0232"
}
}
]
TIA!!
【问题讨论】:
标签: json swift object parsing numbers