summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/syntax-tests.el
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2021-02-13 14:25:42 +0100
committerPhilipp Stephani <phst@google.com>2021-02-13 14:37:19 +0100
commit625de7e403abb24c2d6ae417622fa8c7d6f55530 (patch)
tree9e8f67fff1a1551922a5f9ba297269e2118ce199 /test/lisp/emacs-lisp/syntax-tests.el
parent856502d80d0a3ccfe8c80b65290fdb00e8813391 (diff)
downloademacs-625de7e403abb24c2d6ae417622fa8c7d6f55530.tar.gz
emacs-625de7e403abb24c2d6ae417622fa8c7d6f55530.tar.bz2
emacs-625de7e403abb24c2d6ae417622fa8c7d6f55530.zip
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.
Diffstat (limited to 'test/lisp/emacs-lisp/syntax-tests.el')
0 files changed, 0 insertions, 0 deletions