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

No. That's the whole point of using JSON.parse() instead of eval(). JSON is defined as a non-executing subset of JavaScipt syntax, one that contains only literal expressions. JSON.parse() will only parse valid JSON.

This is why, for instance, there's no native Date format in JSON. Dates in JavaScript require running a constructor -- new Date() -- so they aren't in JSON.



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

Search: