   (emit-map-start [em size])
   (emit-map-end [em])
   (emit-quoted [em o cache])
-  (flush-writer [em])
+  (flush-writer [em stm])
   (prefers-strings [em]))
 
 (def JSON_INT_MAX (Math/pow 2 53))

     (case type
       :json (.createGenerator (JsonFactory.) stm)
       :msgpack (.createPacker (MessagePack.) stm))
     opts))
  java.io.Writer
  (make-writer [^java.io.Writer w type opts]

    (binding [*handlers* (merge default-handlers handlers)]
      (marshal-top m o (write-cache)))
    ;; can we configure JsonGenerator to automatically flush writes?
    (flush-writer m (.stm writer))))

(defn make-handler
  [tag-fn rep-fn str-rep-fn]
