jsLit is a JSON library which can parse JSON strings without using eval (and with no possibility of executing code embedded in the JSON string), or produce JSON strings from JavaScript values. jsLit provides 2 functions:
- makeJsLiteral(value) serializes value into a JSON string, which is returned.
- parseJsLiteral(js) safely evaluates js and returns the parsed value.
Product's homepage
What's New in This Release: [ read full changelog ]
· Do quote property names which are integers with a + prefix (a["+4"] should not become a[4])
· Eliminate ds - use u#### instead
· Fix bug where [] was serialized as [,]
· Use (value instanceof Array) instead of ("length" in value) to detect arrays
· Support dates