From: Mark Oteiza Date: Mon, 4 Jan 2021 03:07:59 +0000 (-0500) Subject: Fix last change in json.el X-Git-Tag: emacs-28.0.90~4406 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9c0387d786fe470de5190fe34f21b671d76c49f5;p=emacs.git Fix last change in json.el * lisp/json.el (json-encode-array): Include optimization for lists. --- 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