X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/41306318777a942420bc4feadbfacf662ea179dc..799d2f3d87185a51835d0594a89485932d0f4c23:/lisp/json.el diff --git a/lisp/json.el b/lisp/json.el index aaa7bb0c49..899bff5dc3 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -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 ;; 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))