CrossClj

3.0.0-alpha1 docs

SourceDocs



RECENT
    VARS
    fressian-codec
    register-fressian-codec

    « Index of all namespaces of this project

    Provides support for using Fressian as an Immutant codec.
    
    (fressian-codec {:keys [name content-type read-handlers write-handlers], :or {name :fressian, content-type "application/fressian"}})
    (register-fressian-codec & options)
    Creates and registers a codec that can be used to encode to/decode from Fressian.
    
    To use vanilla Fressian, call this wih no options and use :fressian
    when passing an encoding to functions that take such.
    
    If you need to provide custom handlers, see the
    [Fressian wiki](https://github.com/clojure/data.fressian/wiki/Creating-custom-handlers)
    for more information on creating them. Note that custom handlers are
    *not* merged with the default handlers - you are responsible for
    that (as shown in the linked example).
    
    You must add org.clojure/data.fressian as a dependency.
    
    options can be a map or kwargs, with these valid keys [default]:
    
    * :name - the name of the encoding [:fressian]
    * :content-type - the content type for the encoding ["application/fressian"]
    * :write-handlers - the full set of handlers to use for writing. If not
      provided, the built-in Fressian defaults are used [nil]
    * :read-handlers the full set of handlers to use for reading. If not
      provided, the built-in Fressian defaults are used [nil]