* src/json.c (Fjson_insert): Precise the behaviour when the current
buffer is multibyte and unibyte, respectively.
* doc/lispref/text.texi (Parsing JSON): Refer to the right function.
(cherry picked from commit
0670032c0dc03c0df6e11b5411b8d10fc61a7d41)
@defun json-insert object &rest args
This function inserts the JSON representation of @var{object} into the
current buffer before point. The argument @var{args} are interpreted
-as in @code{json-parse-string}.
+as in @code{json-serialize}.
@end defun
@defun json-parse-string string &rest args
NULL,
doc: /* Insert the JSON representation of OBJECT before point.
This is the same as (insert (json-serialize OBJECT ...)), but potentially
-faster. See the function `json-serialize' for allowed values of
-OBJECT and ARGS.
+faster, and with the difference that Unicode characters are inserted as
+themselves into multibyte buffers, as UTF-8 bytes into unibyte buffers.
+See the function `json-serialize' for allowed values of OBJECT and ARGS.
usage: (json-insert OBJECT &rest ARGS) */)
(ptrdiff_t nargs, Lisp_Object *args)
{