diff options
| author | Mattias EngdegÄrd | 2024-09-08 20:02:34 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2024-09-08 20:02:34 +0200 |
| commit | e55e2e1c6baebbd105f930fa553ec65c74a3000d (patch) | |
| tree | c171c29f7bcfb8a4a52e74e641506aaf9a2b960d /doc | |
| parent | 89c99891b2b3ab087cd7e824cef391ef26800ab4 (diff) | |
| download | emacs-e55e2e1c6baebbd105f930fa553ec65c74a3000d.tar.gz emacs-e55e2e1c6baebbd105f930fa553ec65c74a3000d.zip | |
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.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/text.texi | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
| 5844 | return any of the possible types described above. | 5844 | return any of the possible types described above. |
| 5845 | 5845 | ||
| 5846 | @defun json-serialize object &rest args | 5846 | @defun json-serialize object &rest args |
| 5847 | This function returns a new Lisp string which contains the JSON | 5847 | This function returns a new Lisp unibyte string which contains the JSON |
| 5848 | representation of @var{object}. The argument @var{args} is a list of | 5848 | representation of @var{object}. The argument @var{args} is a list of |
| 5849 | keyword/argument pairs. The following keywords are accepted: | 5849 | keyword/argument pairs. The following keywords are accepted: |
| 5850 | 5850 | ||