Fix last change in json.el

* lisp/json.el (json-encode-array): Include optimization for lists.
This commit is contained in:
Mark Oteiza 2021-01-03 22:07:59 -05:00
parent dbc16cdd13
commit 9c0387d786

View file

@ -654,7 +654,9 @@ become JSON objects."
(defun json-encode-array (array)
"Return a JSON representation of ARRAY."
(if (and json-encoding-pretty-print
(/= 0 (length array)))
(if (listp array)
array
(> (length array) 0)))
(concat
"["
(json--with-indentation