1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00
emacs/test/src
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-module-resources Update copyright year to 2021 2021-01-01 01:13:56 -08:00
lread-resources Move some test data to follow our conventions 2020-10-23 16:29:46 +02:00
regex-resources ; Fix more typos 2020-10-03 12:53:51 +02:00
syntax-resources Enhance syntax-tests.el to test nestable comments (Lisp style) 2020-11-17 16:51:49 +00:00
alloc-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
buffer-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
callint-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
callproc-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
casefiddle-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
charset-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
chartab-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
cmds-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
coding-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
data-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
decompress-tests.el Prefer skip-unless in more tests 2021-01-13 17:39:53 +01:00
editfns-tests.el Fix copying text properties in 'format' 2021-02-06 11:54:08 +02:00
emacs-module-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
eval-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
fileio-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
floatfns-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
fns-tests.el ; Minor license statement fixes 2021-02-08 09:10:57 +01:00
font-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
indent-tests.el ; Minor license statement fixes 2021-02-08 09:10:57 +01:00
inotify-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
json-tests.el Allow any JSON value at the top level (Bug#42994). 2021-02-13 14:37:19 +01:00
keyboard-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
keymap-tests.el Pretty-print keys without <> around modifiers (bug#45536) 2021-01-05 11:28:58 +01:00
lcms-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
lread-tests.el Add a new variable `inhibit-interaction' 2021-01-12 15:12:38 +01:00
marker-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
minibuf-tests.el * test/src/minibuf-tests.el (test-inhibit-interaction): Fix test. 2021-02-01 12:29:10 +01:00
print-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
process-tests.el ; Fix byte-compilation warning 2021-02-06 20:50:57 +02:00
regex-emacs-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
syntax-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
textprop-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
thread-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
timefns-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
undo-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
xdisp-tests.el * test/src/xdisp-tests.el: Fix tests to work in batch mode 2021-01-18 19:03:01 +02:00
xfaces-tests.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
xml-tests.el Prefer skip-unless in more tests 2021-01-13 17:39:53 +01:00