diff options
author | Stuart Sierra <mail@stuartsierra.com> | 2009-05-14 17:45:21 +0000 |
---|---|---|
committer | Stuart Sierra <mail@stuartsierra.com> | 2009-05-14 17:45:21 +0000 |
commit | 188e6b091cd773f23c0b601ead60e986e16f9eab (patch) | |
tree | abd55328c5789f61900ad7948b6490f31b760e84 /src/clojure/contrib/json/read.clj | |
parent | fcc60a034f9203ce008fe407cb870b92876c7e2b (diff) |
json/read.clj: added type hints to avoid reflection
Diffstat (limited to 'src/clojure/contrib/json/read.clj')
-rw-r--r-- | src/clojure/contrib/json/read.clj | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clojure/contrib/json/read.clj b/src/clojure/contrib/json/read.clj index 4cb40cf4..a76ff5f8 100644 --- a/src/clojure/contrib/json/read.clj +++ b/src/clojure/contrib/json/read.clj @@ -92,7 +92,7 @@ (throw (Exception. "JSON error (non-string key in object)"))) (recur (.read stream) nil (assoc result key element))))))))) -(defn- read-json-hex-character [stream] +(defn- read-json-hex-character [#^PushbackReader stream] ;; Expects to be called with the head of the stream AFTER the ;; initial "\u". Reads the next four characters from the stream. (let [digits [(.read stream) @@ -107,7 +107,7 @@ (throw (Exception. "JSON error (invalid hex character in Unicode character escape)"))) (char (Integer/parseInt (apply str chars) 16))))) -(defn- read-json-escaped-character [stream] +(defn- read-json-escaped-character [#^PushbackReader stream] ;; Expects to be called with the head of the stream AFTER the ;; initial backslash. (let [c (char (.read stream))] |