|
|
|
|
|
by olliej
5479 days ago
|
|
The post actually appears to endorse using eval to parse JSON. Not only does that allow invalid JSON through, it disallows some valid JSON, and of course is a huge security hole. If you want to handle JSON data in JavaScript use JSON.parse -- it's the safest, fastest, and most correct path to having your data available to you. [update: edited to remove bizarre use of whole vs hole... boggles] |
|
json2.js is a must! JSON.parse and JSON.stringify are your friends.
https://github.com/douglascrockford/JSON-js/blob/master/json...