Skip to main content

writer

function

cognitect.transit/writer

(writer [out type] [out type {:keys [handlers default-handler transform]}])
Creates a writer over the provided destination `out` using the specified format, one of: :msgpack, :json or :json-verbose. An optional opts map may be passed. Supported options are: :handlers - a map of types to WriteHandler instances, they are merged with the default-handlers and then with the default handlers provided by transit-java. :default-handler - a default WriteHandler to use if NO handler is found for a type. If no default is specified, an error will be thrown for an unknown type. :transform - a function of one argument that will transform values before they are written.

No examples yet. Be the first to add one!