]> code.delx.au - gnu-emacs/blobdiff - lisp/json.el
Changed Dunnet so that if a lamp is in the room that would otherwise be dark, the...
[gnu-emacs] / lisp / json.el
index aaa7bb0c499a0f012e66cf649e10d35b812a4e45..899bff5dc32f7a114b60a941bc9b0abd7c048667 100644 (file)
@@ -1,6 +1,6 @@
 ;;; json.el --- JavaScript Object Notation parser / generator
 
-;; Copyright (C) 2006-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2006-2014 Free Software Foundation, Inc.
 
 ;; Author: Edward O'Connor <ted@oconnor.cx>
 ;; Version: 1.4
@@ -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))