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

Too my knowledge all browsers now ship with json built in -- if you must work with older browsers (not an entirely unreasonable requirement) you should check for the JSON object first, and if it isn't present load json2.js. Otherwise you're just adding an additional load penalty to your site (and on mobile browsers that can be 100s of milliseconds)


Json2.js does the check. However, it has to be loaded in order to be checked. Not a big issue if you are minifying and bundling all your js files before sending them to the browser client.




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

Search: