   ([out type] (writer out type {}))
   ([^OutputStream out type opts]
      (if (#{:json :json-verbose :msgpack} type)
-       (let [handlers (merge (default-write-handlers) (:handlers opts))]
+       (let [handlers (merge default-write-handlers (:handlers opts))]
          (Writer. (TransitFactory/writer (transit-format type) out handlers)))
        (throw (ex-info "Type must be :json, :json-verbose or :msgpack" {:type type})))))
 

                   (aset next-key 0 marker)
                   (assoc! m k item)))))
           (complete [_ m] (persistent! m))))))
}))

(defn default-read-handlers
  "Returns a map of default ReadHandlers for
   Clojure types. Java types are handled
   by the default ReadHandlers provided by the
   transit-java library."
  []
  @default-read-handlers*)

(defn map-builder
  "Creates a MapBuilder that makes Clojure-

  ([in type] (reader in type {}))
  ([^InputStream in type opts]
     (if (#{:json :json-verbose :msgpack} type)
       (let [handlers (merge default-read-handlers (:handlers opts))
             default-handler (:default-handler opts)
             reader (TransitFactory/reader (transit-format type)
                                           in
