Make json-serialize always return a unibyte string (bug#70007)
authorMattias Engdegård <mattiase@acm.org>
Sun, 8 Sep 2024 18:02:34 +0000 (20:02 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sun, 8 Sep 2024 18:02:34 +0000 (20:02 +0200)
commite55e2e1c6baebbd105f930fa553ec65c74a3000d
treec171c29f7bcfb8a4a52e74e641506aaf9a2b960d
parent89c99891b2b3ab087cd7e824cef391ef26800ab4
Make json-serialize always return a unibyte string (bug#70007)

The JSON format is defined as a byte sequence and will always be used as
such, so returning a multibyte string makes little sense.

* src/json.c (json_out_to_string): Remove.
(Fjson_serialize): Return unibyte string.
* test/src/json-tests.el (json-serialize/roundtrip)
(json-serialize/roundtrip-scalars, json-serialize/string):
Update tests.
* doc/lispref/text.texi (Parsing JSON): Document.
* etc/NEWS: Announce.
doc/lispref/text.texi
etc/NEWS
src/json.c
test/src/json-tests.el