1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 08:11:05 -08:00
emacs/doc
Philipp Stephani 625de7e403 Allow any JSON value at the top level (Bug#42994).
Newer standards like RFC 8259, which obsoletes the earlier RFC 4627,
now allow any top-level value unconditionally, so Emacs should too.

* src/json.c (Fjson_serialize, Fjson_insert): Pass JSON_ENCODE_ANY to
allow serialization of any JSON value.  Call 'lisp_to_json' instead of
'lisp_to_json_toplevel'.  Remove obsolete comments
(neither JSON_DECODE_ANY nor JSON_ALLOW_NUL are allowed here).  Reword
documentation strings.
(Fjson_parse_string, Fjson_parse_buffer): Pass JSON_DECODE_ANY to
allow deserialization of any JSON value.  Reword documentation
strings.
(lisp_to_json_nonscalar, lisp_to_json_nonscalar_1): Rename from
"toplevel" to avoid confusion.
(lisp_to_json): Adapt caller.
* test/src/json-tests.el (json-serialize/roundtrip-scalars): New unit
test.
* doc/lispref/text.texi (Parsing JSON): Update documentation.
2021-02-13 14:37:19 +01:00
..
emacs Finish customize-changed-options/customize-changed fix up 2021-02-09 08:20:08 +01:00
lispintro Update copyright year to 2021 2021-01-01 01:13:56 -08:00
lispref Allow any JSON value at the top level (Bug#42994). 2021-02-13 14:37:19 +01:00
man Update copyright year to 2021 2021-01-01 01:13:56 -08:00
misc Fix two Emacs version references in misc manuals 2021-02-11 19:21:48 +01:00