 
   The default date format (in UTC) is: yyyy-MM-dd'T'HH:mm:ss'Z'"
   ([obj]
-     (generate-smile obj nil))
+   (generate-smile obj nil))
   ([obj opt-map]
-     (let [baos (ByteArrayOutputStream.)
-           generator (.createJsonGenerator ^SmileFactory
-                                           (or factory/*smile-factory*
-                                               factory/smile-factory)
-                                           baos)]
-       (gen/generate generator obj (or (:date-format opt-map)
-                                       factory/default-date-format)
-                     (:ex opt-map)
-                     (:key-fn opt-map))
-       (.flush generator)
-       (.toByteArray baos))))
+   (let [baos (ByteArrayOutputStream.)
+         generator (.createGenerator ^SmileFactory
+                                     (or factory/*smile-factory*
+                                         factory/smile-factory)
+                                     ^OutputStream baos)]
+     (gen/generate generator obj (or (:date-format opt-map)
+                                     factory/default-date-format)
+                   (:ex opt-map)
+                   (:key-fn opt-map))
+     (.flush generator)
+     (.toByteArray baos))))
 
 (defn generate-cbor
   "Returns a CBOR-encoded byte-array for the given Clojure object.

  ([bytes] (parse-smile bytes nil nil))
  ([bytes key-fn] (parse-smile bytes key-fn nil))
  ([^bytes bytes key-fn array-coerce-fn]
     (when bytes
       (parse/parse
        (.createJsonParser ^SmileFactory (or factory/*smile-factory*
                                             factory/smile-factory) bytes)
        key-fn nil array-coerce-fn))))

(defn parse-cbor
  "Returns the Clojure object corresponding to the given CBOR-encoded bytes.


  The default date format (in UTC) is: yyyy-MM-dd'T'HH:mm:ss'Z'"
  ([obj]
   (generate-cbor obj nil))
  ([obj opt-map]
   (let [baos (ByteArrayOutputStream.)
         generator (.createGenerator ^CBORFactory
                                     (or factory/*cbor-factory*
                                         factory/cbor-factory)
                                     ^OutputStream baos)]
     (gen/generate generator obj (or (:date-format opt-map)
                                     factory/default-date-format)
                   (:ex opt-map)
                   (:key-fn opt-map))
     (.flush generator)
     (.toByteArray baos))))

;; Parsers
(defn parse-string
