aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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