               (recur)))))))
 
 (defn- read-integer [^String string]
-  (if (< (count string) 18)  ; definitely fits in a Long
+  (if (< (.length string) 18)  ; definitely fits in a Long
     (Long/valueOf string)
     (or (try (Long/valueOf string)
              (catch NumberFormatException e nil))

(defn- read-quoted-string [^PushbackReader stream]
  ;; Expects to be called with the head of the stream AFTER the
  ;; opening quotation mark.
  (let [buffer (StringBuilder.)]
    (loop []
      (let [c (.read stream)]
        (when (neg? c)

    (Double/valueOf string)))

(defn- read-number [^PushbackReader stream]
  (let [buffer (StringBuilder. 4)
        decimal? (loop [decimal? false]
                   (let [c (.read stream)]
                     (codepoint-case c
