[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 9c0387d: Fix last change in json.el
From: |
Mark Oteiza |
Subject: |
master 9c0387d: Fix last change in json.el |
Date: |
Sun, 3 Jan 2021 22:08:54 -0500 (EST) |
branch: master
commit 9c0387d786fe470de5190fe34f21b671d76c49f5
Author: Mark Oteiza <mvoteiza@udel.edu>
Commit: Mark Oteiza <mvoteiza@udel.edu>
Fix last change in json.el
* lisp/json.el (json-encode-array): Include optimization for lists.
---
lisp/json.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/json.el b/lisp/json.el
index 2498659..1f1f608 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 9c0387d: Fix last change in json.el,
Mark Oteiza <=