Liking cljdoc? Tell your friends :D

cognitect.transit

An implementation of the transit-format for Clojure built on top of the transit-java library.

An implementation of the transit-format for Clojure built
on top of the transit-java library.
raw docstring

default-read-handlersclj

Returns a map of default ReadHandlers for Clojure types. Java types are handled by the default ReadHandlers provided by the transit-java library.

Returns a map of default ReadHandlers for
Clojure types. Java types are handled
by the default ReadHandlers provided by the
transit-java library.
sourceraw docstring

default-write-handlersclj

Returns a map of default WriteHandlers for Clojure types. Java types are handled by the default WriteHandlers provided by the transit-java library.

Returns a map of default WriteHandlers for
Clojure types. Java types are handled
by the default WriteHandlers provided by the
transit-java library.
sourceraw docstring

HandlerMapProvidercljprotocol

handler-mapclj

(handler-map this)
source

list-builderclj

(list-builder)

Creates an ArrayBuilder that makes Clojure- compatible lists.

Creates an ArrayBuilder that makes Clojure-
compatible lists.
sourceraw docstring

map-builderclj

(map-builder)

Creates a MapBuilder that makes Clojure- compatible maps.

Creates a MapBuilder that makes Clojure-
compatible maps.
sourceraw docstring

nsed-nameclj

(nsed-name kw-or-sym)

Convert a keyword or symbol to a string in namespace/name format.

Convert a keyword or symbol to a string in
namespace/name format.
sourceraw docstring

readclj

(read reader)

Reads a value from a reader. Throws a RuntimeException when the reader's InputStream is empty.

Reads a value from a reader. Throws a RuntimeException when
the reader's InputStream is empty.
sourceraw docstring

read-array-handlerclj

(read-array-handler from-rep array-reader)

Creates a Transit ArrayReadHandler whose fromRep and arrayReader methods invoke the provided fns.

Creates a Transit ArrayReadHandler whose fromRep
and arrayReader methods invoke the provided fns.
sourceraw docstring

read-handlerclj

(read-handler from-rep)

Creates a transit ReadHandler whose fromRep method invokes the provided fn.

Creates a transit ReadHandler whose fromRep
method invokes the provided fn.
sourceraw docstring

read-handler-mapclj

(read-handler-map custom-handlers)

Returns a HandlerMapContainer containing a ReadHandlerMap containing all the default handlers for Clojure and Java and any custom handlers that you supply, letting you store the return value and pass it to multiple invocations of reader. This can be more efficient than repeatedly handing the same raw map of tags -> custom handlers to reader.

Returns a HandlerMapContainer containing a ReadHandlerMap
containing all the default handlers for Clojure and Java and any
custom handlers that you supply, letting you store the return value
and pass it to multiple invocations of reader.  This can be more
efficient than repeatedly handing the same raw map of tags -> custom
handlers to reader.
sourceraw docstring

read-map-handlerclj

(read-map-handler from-rep map-reader)

Creates a Transit MapReadHandler whose fromRep and mapReader methods invoke the provided fns.

Creates a Transit MapReadHandler whose fromRep
and mapReader methods invoke the provided fns.
sourceraw docstring

readerclj

(reader in type)
(reader in type {:keys [handlers default-handler]})

Creates a reader over the provided source in 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 tags to ReadHandler instances, they are merged with the Clojure default-read-handlers and then with the default ReadHandlers provided by transit-java.

:default-handler - an instance of DefaultReadHandler, used to process transit encoded values for which there is no other ReadHandler; if :default-handler is not specified, non-readable values are returned as TaggedValues.

Creates a reader over the provided source `in` 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 tags to ReadHandler instances, they are merged
with the Clojure default-read-handlers and then with the default ReadHandlers
provided by transit-java.

:default-handler - an instance of DefaultReadHandler, used to process
transit encoded values for which there is no other ReadHandler; if
:default-handler is not specified, non-readable values are returned
as TaggedValues.
sourceraw docstring

record-read-handlerclj

(record-read-handler type)

Creates a ReadHandler for a record type

Creates a ReadHandler for a record type
sourceraw docstring

record-read-handlersclj

(record-read-handlers & types)

Creates a map of record type tags to ReadHandlers

Creates a map of record type tags to ReadHandlers
sourceraw docstring

record-write-handlerclj

(record-write-handler type)

Creates a WriteHandler for a record type

Creates a WriteHandler for a record type
sourceraw docstring

record-write-handlersclj

(record-write-handlers & types)

Creates a map of record types to WriteHandlers

Creates a map of record types to WriteHandlers
sourceraw docstring

tagged-valueclj

(tagged-value tag rep)

Creates a TaggedValue object.

Creates a TaggedValue object.
sourceraw docstring

writeclj

(write writer o)

Writes a value to a transit writer.

Writes a value to a transit writer.
sourceraw docstring

write-handlerclj

(write-handler tag-fn rep-fn)
(write-handler tag-fn rep-fn str-rep-fn)
(write-handler tag-fn rep-fn str-rep-fn verbose-handler-fn)

Creates a transit WriteHandler whose tag, rep, stringRep, and verboseWriteHandler methods invoke the provided fns.

If a non-fn is passed as an argument, implemented handler method returns the value unaltered.

Creates a transit WriteHandler whose tag, rep,
stringRep, and verboseWriteHandler methods
invoke the provided fns.

If a non-fn is passed as an argument, implemented
handler method returns the value unaltered.
sourceraw docstring

write-handler-mapclj

(write-handler-map custom-handlers)

Returns a HandlerMapContainer containing a WriteHandlerMap containing all the default handlers for Clojure and Java and any custom handlers that you supply, letting you store the return value and pass it to multiple invocations of writer. This can be more efficient than repeatedly handing the same raw map of types -> custom handlers to writer.

Returns a HandlerMapContainer containing a WriteHandlerMap
containing all the default handlers for Clojure and Java and any
custom handlers that you supply, letting you store the return value
and pass it to multiple invocations of writer.  This can be more
efficient than repeatedly handing the same raw map of types -> custom
handlers to writer.
sourceraw docstring

write-metaclj

(write-meta x)

For :transform. Will write any metadata present on the value.

For :transform. Will write any metadata present on the value.
sourceraw docstring

writerclj

(writer out type)
(writer out type {:keys [handlers 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.

:transform - a function of one argument that will transform values before they are written.

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.

:transform - a function of one argument that will transform values before
they are written.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close