have a crash for parse data
- Dominant language
- Swift
- Stars
- 4.3k
- Forks
- 677
- PR merge metrics
- No merged PRs in 30d
Description
Xcode Version 9.3 beta 4 (9Q127n)
follow is the data:
{
"code": 200,
"msg": "OK",
"data": {
"alternative": [],
"favourite": [{
"id": "5adf4fe28bb78e4d9bc17379",
"name": "自选",
"isFavourite": true,
"isRecommend": true,
"logo": "",
"url": "option"
}, {
"id": "5adf4fe28bb78e4d9bc1737a",
"name": "全网",
"isFavourite": true,
"isRecommend": true,
"logo": "",
"url": "all"
}, {
"id": "5adf4fe48bb78e4d9bc1737b",
"name": "BitMEX",
"isFavourite": true,
"isRecommend": true,
"logo": "",
"url": "https://www.bitmex.com/"
}, {
"id": "5adf4fe68bb78e4d9bc1737c",
"name": "币安网",
"isFavourite": true,
"isRecommend": true,
"logo": "",
"url": "https://www.binance.com/"
}, {
"id": "5adf4fe98bb78e4d9bc1737d",
"name": "OKEX",
"isFavourite": true,
"isRecommend": true,
"logo": "",
"url": "https://www.okex.com"
}, {
"id": "5adf4fec8bb78e4d9bc1737f",
"name": "火币Pro",
"isFavourite": true,
"isRecommend": true,
"logo": "",
"url": "https://www.huobipro.com"
}, {
"id": "5adf4fec8bb78e4d9bc17380",
"name": "Bitfinex",
"isFavourite": true,
"isRecommend": true,
"logo": "",
"url": "https://www.bitfinex.com"
}, {
"id": "5adf4fed8bb78e4d9bc17381",
"name": "Bithumb",
"isFavourite": true,
"isRecommend": true,
"logo": "",
"url": "https://www.bithumb.com/"
}]
}
}
have a crash when parse the data :
guard nominalTypeDescriptor.numberOfFields != 0 else {
return []
}
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the crash with the supplied JSON in Xcode 9.3 beta 4, then inspect the parser path containing the nominalTypeDescriptor.numberOfFields guard. Done means this payload parses without crashing; the issue does not name a test or source file to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100