4 ms·
Look, you're just wrong. The only exception to "eval" is some obscure unicode bug others are mentioning. JSON is literally a JS object literal (with the additio
by ninjaplease 12y ago
Look, you're just wrong. The only exception to "eval" is some obscure unicode bug others are mentioning. JSON is literally a JS object literal (with the additional requirement that any key be a string). There's also no reason to use eval when JSON.parse will do it safely.
- gnaritas 12y agoNo I'm not wrong and there mere fact that you mention the exception means you've conceded my point; and those aren't bugs, they're in the spec which means it was never a subset of JS. > JSON is literally a JS object literal (with the additional requirement that any key be a string). Which makes it not a JS object literal but a near subset with slightly different rules with unicode strings that make it not even a subset.
- ninjaplease 12y agoWhat spec are you looking at? http://www.ietf.org/rfc/rfc4627.txt http://www.ietf.org/rfc/rfc4627.txt specifically says in section 2.5 that all unicode characters are meant to be supported. So now you're wrong twice.
- gnaritas 12y agoTry learning something jackass: http://timelessrepo.com/json-isnt-a-javascript-subset http://timelessrepo.com/json-isnt-a-javascript-subset