Hacker News new | ask | show | jobs
by thasian 2371 days ago
Must've been a lot of work. I considered writing a library for the Web API in Swift, but there's just too much maintenance. There were also some weird bugs I encountered when parsing JSON like the time stamps being in the wrong format.
1 comments

Yeah. I just leave the json parsing up to the caller partly as a simplification, but also because I might accidentally discard data they want (Like, ideally that should never happen but our world is not ideal). The only thing it wraps is the authentication (to make life easier), and the web request. The C code is generated from a small python script that's generated directly from the documentation so it's relatively easy to keep up-to-date, the sacrifice is it is a bit more fragile than I like.