Function: json-read-string
json-read-string is a byte-compiled function defined in json.el.gz.
Signature
(json-read-string)
Documentation
Read the JSON string at point.
Source Code
;; Defined in /usr/src/emacs/lisp/json.el.gz
(defun json-read-string ()
"Read the JSON string at point."
;; Skip over the '"'.
(json-advance)
(let ((characters '())
(char (json-peek)))
(while (/= char ?\")
(when (< char 32)
(if (zerop char)
(signal 'json-end-of-file ())
(signal 'json-string-format (list char))))
(push (if (= char ?\\)
(json-read-escaped-char)
(json-advance)
char)
characters)
(setq char (json-peek)))
;; Skip over the '"'.
(json-advance)
(if characters
(concat (nreverse characters))
"")))