aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Oteiza2021-01-03 22:07:59 -0500
committerMark Oteiza2021-01-03 22:07:59 -0500
commit9c0387d786fe470de5190fe34f21b671d76c49f5 (patch)
tree34fef76acf11dc48e852518284757d93bf231277
parentdbc16cdd1351604c7489bd021bcc0d0d6a809b79 (diff)
downloademacs-9c0387d786fe470de5190fe34f21b671d76c49f5.tar.gz
emacs-9c0387d786fe470de5190fe34f21b671d76c49f5.zip
Fix last change in json.el
* lisp/json.el (json-encode-array): Include optimization for lists.
-rw-r--r--lisp/json.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/json.el b/lisp/json.el
index 24986590cb0..1f1f608eaba 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -654,7 +654,9 @@ become JSON objects."
654(defun json-encode-array (array) 654(defun json-encode-array (array)
655 "Return a JSON representation of ARRAY." 655 "Return a JSON representation of ARRAY."
656 (if (and json-encoding-pretty-print 656 (if (and json-encoding-pretty-print
657 (/= 0 (length array))) 657 (if (listp array)
658 array
659 (> (length array) 0)))
658 (concat 660 (concat
659 "[" 661 "["
660 (json--with-indentation 662 (json--with-indentation