diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2025-05-24 10:16:10 +0200 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2025-05-24 10:16:10 +0200 |
commit | 1dfaa616801a8f559eb7abf232f008a27ff5958a (patch) | |
tree | 44780bf9c77384a05404c7b0728466d8486a8e42 /doc/quickjs.texi | |
parent | 8b2a1249a46e85271aa7da1738875eb1cbec06d0 (diff) | |
download | quickjs-1dfaa616801a8f559eb7abf232f008a27ff5958a.tar.gz quickjs-1dfaa616801a8f559eb7abf232f008a27ff5958a.zip |
improved compatibility of std.parseExtJSON() with JSON5
Diffstat (limited to 'doc/quickjs.texi')
-rw-r--r-- | doc/quickjs.texi | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/doc/quickjs.texi b/doc/quickjs.texi index eef00b7..9130b47 100644 --- a/doc/quickjs.texi +++ b/doc/quickjs.texi @@ -449,17 +449,20 @@ optional properties: @item parseExtJSON(str) - Parse @code{str} using a superset of @code{JSON.parse}. The - following extensions are accepted: + Parse @code{str} using a superset of @code{JSON.parse}. The superset + is very close to the JSON5 specification. The following extensions + are accepted: @itemize @item Single line and multiline comments @item unquoted properties (ASCII-only Javascript identifiers) @item trailing comma in array and object definitions @item single quoted strings + @item @code{\v} escape and multi-line strings with trailing @code{\} @item @code{\f} and @code{\v} are accepted as space characters - @item leading plus in numbers - @item octal (@code{0o} prefix) and hexadecimal (@code{0x} prefix) numbers + @item leading plus or decimal point in numbers + @item hexadecimal (@code{0x} prefix), octal (@code{0o} prefix) and binary (@code{0b} prefix) integers + @item @code{NaN} and @code{Infinity} are accepted as numbers @end itemize @end table |