diff options
author | Mark Oteiza <mvoteiza@udel.edu> | 2021-01-03 22:07:59 -0500 |
---|---|---|
committer | Mark Oteiza <mvoteiza@udel.edu> | 2021-01-03 22:07:59 -0500 |
commit | 9c0387d786fe470de5190fe34f21b671d76c49f5 (patch) | |
tree | 34fef76acf11dc48e852518284757d93bf231277 | |
parent | dbc16cdd1351604c7489bd021bcc0d0d6a809b79 (diff) | |
download | emacs-9c0387d786fe470de5190fe34f21b671d76c49f5.tar.gz |
Fix last change in json.el
* lisp/json.el (json-encode-array): Include optimization for lists.
-rw-r--r-- | lisp/json.el | 4 |
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." (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 |