   (let [buffer (StringBuilder.)]
     (loop [i (.read stream)]
       (when (neg? i) (throw (EOFException. "JSON error (end-of-file inside array)")))
-      (let [c (char i)]
+      (let [c i]
         (cond
-         (= c \") (str buffer)
-         (= c \\) (do (.append buffer (read-json-escaped-character stream))
+         (= c (codepoint \")) (str buffer)
+         (= c (codepoint \\)) (do (.append buffer (read-json-escaped-character stream))
                       (recur (.read stream)))
-         :else (do (.append buffer c)
+         :else (do (.append buffer (char c))
                    (recur (.read stream))))))))
 
 (defn- read-json-reader


;;; JSON READER

(declare read-json-reader)

(defn- read-json-array [^PushbackReader stream keywordize?]

(defn- read-json-escaped-character [^PushbackReader stream]
  ;; Expects to be called with the head of the stream AFTER the
  ;; initial backslash.
  (let [c (.read stream)]
    (cond
     (#{(codepoint \") (codepoint \\) (codepoint \/)} c) (char c)
     (= c (codepoint \b)) \backspace
     (= c (codepoint \f)) \formfeed
     (= c (codepoint \n)) \newline
     (= c (codepoint \r)) \return
     (= c (codepoint \t)) \tab
     (= c (codepoint \u)) (read-json-hex-character stream))))

(defn- read-json-quoted-string [^PushbackReader stream]
  ;; Expects to be called with the head of the stream AFTER the
