Function: json-read-number

json-read-number is a byte-compiled function defined in json.el.gz.

Signature

(json-read-number &optional SIGN)

Documentation

Read the JSON number following point.

Source Code

;; Defined in /usr/src/emacs/lisp/json.el.gz
     (? (in "Ee") (? (in ?+ ?-)) (+ digit)))) ; Exponent.

(defun json-read-number (&optional _sign)
  "Read the JSON number following point."
  (declare (advertised-calling-convention () "28.1"))
  (or (looking-at (rx json--number))
      (signal 'json-number-format (list (point))))
  (goto-char (match-end 0))
  (prog1 (string-to-number (match-string 0))
    (or (looking-at-p (rx json--post-value))
        (signal 'json-number-format (list (point))))
    (json-skip-whitespace)))