projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbc16cd
)
Fix last change in json.el
author
Mark Oteiza
<mvoteiza@udel.edu>
Mon, 4 Jan 2021 03:07:59 +0000
(22:07 -0500)
committer
Mark 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
patch
|
blob
|
history
diff --git
a/lisp/json.el
b/lisp/json.el
index 24986590cb028b25a9b2ff283800f6dd6677553e..1f1f608eabaef57b75a36c4d6ef36659e76c4d2c 100644
(file)
--- 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