3 ms·
>Parsing a JSON response into a Swift object takes a full-day to figure out when it's literally just JSON.parse(response) in any other language. Something whic
by coldtea 11y ago
>Parsing a JSON response into a Swift object takes a full-day to figure out when it's literally just JSON.parse(response) in any other language.
Something which has nothing to do with the language.
Here's how you do it with a popular Swift lib:
let json = JSON(data: response)
if let userName = json[0]["user"]["name"].string{
....
}
- chc 11y agoEh, the awful state of their respective standard libraries seems to come up quite a bit when people are critiquing OCaml or D.