资 源 简 介
A fast and secure JSON parser in JavaScript
This JSON parser does not attempt to validate the JSON, so may return a surprising result given a syntactically invalid input, but it does not use eval so is deterministic and is guaranteed not to modify any object other than its return value.
There are a number of JSON parsers in JavaScript at json.org. This implementation should be used whenever security is a concern (when JSON may come from an untrusted source), speed is a concern, and erroring on malformed JSON is not a concern.
| | Pros | Cons |
|:-----------------------|:---------------------------|:--------------------------|
| This implementation | Fast, secure | Not validating |
| json_parse.js | Validating, secure | Slow