diff options
author | Simon Schubert <2@0x2c.org> | 2013-11-25 00:49:37 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2013-11-25 00:49:37 +0200 |
commit | 7c1bf12e5c285dc2b3955e0a911766370ac0af1e (patch) | |
tree | 01f2366a87192e32902a741e62035f830a793ed0 /lisp/json.el | |
parent | 64e415297c09d9c92a6b1460c19f97fb4446844d (diff) | |
download | emacs-7c1bf12e5c285dc2b3955e0a911766370ac0af1e.tar.gz emacs-7c1bf12e5c285dc2b3955e0a911766370ac0af1e.tar.bz2 emacs-7c1bf12e5c285dc2b3955e0a911766370ac0af1e.zip |
* lisp/json.el (json-alist-p): Only return non-nil if the alist has
simple keys.
Fixes: debbugs:13518
Diffstat (limited to 'lisp/json.el')
-rw-r--r-- | lisp/json.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/json.el b/lisp/json.el index aaa7bb0c499..21523c1aa8b 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -126,9 +126,10 @@ without indentation.") (mapconcat 'identity strings separator)) (defun json-alist-p (list) - "Non-null if and only if LIST is an alist." + "Non-null if and only if LIST is an alist with simple keys." (while (consp list) - (setq list (if (consp (car list)) + (setq list (if (and (consp (car list)) + (atom (caar list))) (cdr list) 'not-alist))) (null list)) |