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

I have to comment on this line:

> Some libraries implement an unsafe, but fast, JSON parse using “eval” for older browsers

eval is not fast! In fact it is the opposite of fast. Most JIT optimizations go away in the face of eval()! Do not use it even if you know it's safe. Use JSON.parse instead.



"Older browsers" means those that predate native JSON methods. Libraries often use eval() as a fallback.




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

Search: