From 9c0387d786fe470de5190fe34f21b671d76c49f5 Mon Sep 17 00:00:00 2001 From: Mark Oteiza Date: Sun, 3 Jan 2021 22:07:59 -0500 Subject: [PATCH] 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 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 -- 2.39.5