diff options
Diffstat (limited to 'lisp/json.el')
-rw-r--r-- | lisp/json.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/json.el b/lisp/json.el index ac323dac295..6f3b791ed17 100644 --- a/lisp/json.el +++ b/lisp/json.el @@ -227,6 +227,7 @@ Unlike `reverse', this keeps the property-value pairs intact." (define-error 'json-string-format "Bad string format" 'json-error) (define-error 'json-key-format "Bad JSON object key" 'json-error) (define-error 'json-object-format "Bad JSON object" 'json-error) +(define-error 'json-array-format "Bad JSON array" 'json-error) (define-error 'json-end-of-file "End of file while parsing JSON" '(end-of-file json-error)) @@ -640,7 +641,7 @@ become JSON objects." (when (/= (json-peek) ?\]) (if (= (json-peek) ?,) (json-advance) - (signal 'json-error (list 'bleah))))) + (signal 'json-array-format (list ?, (json-peek)))))) ;; Skip over the "]" (json-advance) (pcase json-array-type |