Hacker News new | past | comments | ask | show | jobs | submit login

JSON is not actually strictly a subset of JavaScript, surprisingly. Although, in practice, it doesn't really matter, because you wouldn't want to blindly eval JSON data, anyway.

I mention this not to be pedantic, but in case it helps another coder from wasting a couple days chasing a bug like I once had to, when I thought I could template raw JSON into a script file to make some server-side data available as a global var on in the browser.

http://timelessrepo.com/json-isnt-a-javascript-subset




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

Search: