From e55e2e1c6baebbd105f930fa553ec65c74a3000d Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Sun, 8 Sep 2024 20:02:34 +0200 Subject: 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 278b53d7f65..df56433fd18 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -5844,7 +5844,7 @@ can be serialized to JSON@. Likewise, the parsing functions will return any of the possible types described above. @defun json-serialize object &rest args -This function returns a new Lisp string which contains the JSON +This function returns a new Lisp unibyte string which contains the JSON representation of @var{object}. The argument @var{args} is a list of keyword/argument pairs. The following keywords are accepted: -- cgit v1.3