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

Mostly because JSON is one of the most common formats used when sending over data. I think this practice started with pythons requests (which is my real answer as to what you should use in python but I wanted to focus on the stdlib), which has a json function on the Response object for convenience.

Most languages nowadays tend to implement some variation of this specific convenience because it's just one of the most frequently needed things; setting up a separate parser and then calling it might be the "cleaner" option, but it's also more boilerplate and the industry has largely moved to try and avoid that.



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

Search: