]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix last change in json.el
authorMark Oteiza <mvoteiza@udel.edu>
Mon, 4 Jan 2021 03:07:59 +0000 (22:07 -0500)
committerMark Oteiza <mvoteiza@udel.edu>
Mon, 4 Jan 2021 03:07:59 +0000 (22:07 -0500)
* lisp/json.el (json-encode-array): Include optimization for lists.

lisp/json.el

index 24986590cb028b25a9b2ff283800f6dd6677553e..1f1f608eabaef57b75a36c4d6ef36659e76c4d2c 100644 (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