Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>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{ .... }



Eh, the awful state of their respective standard libraries seems to come up quite a bit when people are critiquing OCaml or D.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: