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.
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.
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.
(handler-map this)
(list-builder)
Creates an ArrayBuilder that makes Clojure- compatible lists.
Creates an ArrayBuilder that makes Clojure- compatible lists.
(map-builder)
Creates a MapBuilder that makes Clojure- compatible maps.
Creates a MapBuilder that makes Clojure- compatible maps.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(record-read-handler type)
Creates a ReadHandler for a record type
Creates a ReadHandler for a record type
(record-read-handlers & types)
Creates a map of record type tags to ReadHandlers
Creates a map of record type tags to ReadHandlers
(record-write-handler type)
Creates a WriteHandler for a record type
Creates a WriteHandler for a record type
(record-write-handlers & types)
Creates a map of record types to WriteHandlers
Creates a map of record types to WriteHandlers
(tagged-value tag rep)
Creates a TaggedValue object.
Creates a TaggedValue object.
(write writer o)
Writes a value to a transit writer.
Writes a value to a transit writer.
(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.
(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.
(write-meta x)
For :transform. Will write any metadata present on the value.
For :transform. Will write any metadata present on the value.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close