   ([rdr] (parse-stream rdr nil nil))
   ([rdr key-fn] (parse-stream rdr key-fn nil))
   ([^BufferedReader rdr key-fn array-coerce-fn]
-     (when rdr
-       (parse/parse
-        (.createJsonParser ^JsonFactory (or factory/*json-factory*
-                                            factory/json-factory) rdr)
-        key-fn nil array-coerce-fn))))
+   (when rdr
+     (parse/parse
+      (.createParser ^JsonFactory (or factory/*json-factory*
+                                      factory/json-factory)
+                     ^Reader rdr)
+      key-fn nil array-coerce-fn))))
 
 (defn parse-smile
   "Returns the Clojure object corresponding to the given SMILE-encoded bytes.

  ([reader] (parsed-seq reader nil nil))
  ([reader key-fn] (parsed-seq reader key-fn nil))
  ([^BufferedReader reader key-fn array-coerce-fn]
     (when reader
       (parsed-seq* (.createJsonParser ^JsonFactory
                                       (or factory/*json-factory*
                                           factory/json-factory) reader)
                    key-fn array-coerce-fn))))

(defn parsed-smile-seq
  "Returns a lazy seq of Clojure objects corresponding to the SMILE read from

  ([reader] (parsed-smile-seq reader nil nil))
  ([reader key-fn] (parsed-smile-seq reader key-fn nil))
  ([^BufferedReader reader key-fn array-coerce-fn]
   (when reader
     (parsed-seq* (.createParser ^SmileFactory
                                 (or factory/*smile-factory*
                                     factory/smile-factory)
                                 ^Reader reader)
                  key-fn array-coerce-fn))))

;; aliases for clojure-json users
(def encode "Alias to generate-string for clojure-json users" generate-string)
