Yes, that's odd - it seems like JSON.parse should really produce an exception. Could you file a bug for it on GitHub?
The whole parsing thing is annoying. It did work, and then someone raised a bug because it worked when it should have failed, and that could have been a security bug - maybe. So I had to disable it :(
So if you care about stuff like that, now you have to use eval - but if you do that then you need to be sure you trust your source of data :)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Yes, that's odd - it seems like JSON.parse should really produce an exception. Could you file a bug for it on GitHub?
The whole parsing thing is annoying. It did work, and then someone raised a bug because it worked when it should have failed, and that could have been a security bug - maybe. So I had to disable it :(
So if you care about stuff like that, now you have to use
eval
- but if you do that then you need to be sure you trust your source of data :)