Liking cljdoc? Tell your friends :D

clojure.data.fressian

Read/write fressian data. See http://www.edn-format.org/

Read/write fressian data. See http://www.edn-format.org/
raw docstring

associative-lookupclj

(associative-lookup o)

Build an ILookup from an associative collection.

Build an ILookup from an associative collection.
sourceraw docstring

begin-closed-listclj

(begin-closed-list writer)

Begin writing a fressianed list. To end the list, call end-list. Used to write sequential data whose size is not known in advance.

Begin writing a fressianed list.  To end the list, call end-list.
Used to write sequential data whose size is not known in advance.
sourceraw docstring

begin-open-listclj

(begin-open-list writer)

Advanced. Writes fressian code to begin an open list. An open list can be terminated either by a call to end-list, or by simply closing the stream. Used to write sequential data whose size is not known in advance, in contexts where stream failure can safely be interpreted as end of list.

Advanced.  Writes fressian code to begin an open list.  An
open list can be terminated either by a call to end-list,
or by simply closing the stream.  Used to write sequential
data whose size is not known in advance, in contexts where
stream failure can safely be interpreted as end of list.
sourceraw docstring

clojure-read-handlersclj

Standard set of read handlers for Clojure data.

Standard set of read handlers for Clojure data.
sourceraw docstring

clojure-write-handlersclj

Standard set of write handlers for Clojure data.

Standard set of write handlers for Clojure data.
sourceraw docstring

create-readerclj

(create-reader in & {:keys [handlers checksum?]})

Create a fressian reader targeting in, which must be compatible with clojure.java.io/input-stream. Handlers must be a map of tag => ReadHandler wrapped in associative-lookup. See clojure-read-handlers for an example.

Create a fressian reader targeting in, which must be compatible
with clojure.java.io/input-stream.  Handlers must be a map of
tag => ReadHandler wrapped in associative-lookup. See
clojure-read-handlers for an example.
sourceraw docstring

create-writerclj

(create-writer out & {:keys [handlers]})

Create a fressian writer targeting out. Handlers must be a nested map of type => tag => WriteHandler wrapped with associative-lookup and inheritance-lookup. See clojure-write-handlers for an example.

Create a fressian writer targeting out. Handlers must be
a nested map of type => tag => WriteHandler wrapped with
associative-lookup and inheritance-lookup. See
clojure-write-handlers for an example.
sourceraw docstring

end-listclj

(end-list writer)

Ends a list begun with begin-closed-list.

Ends a list begun with begin-closed-list.
sourceraw docstring

field-caching-writerclj

(field-caching-writer cache-pred)

Returns a record writer that caches values for keys matching cache-pred, which is typically specified as a set, e.g. (field-caching-writer #{:color})

Returns a record writer that caches values for keys
matching cache-pred, which is typically specified
as a set, e.g. (field-caching-writer #{:color})
sourceraw docstring

FressianReadablecljprotocol

to-input-streamclj

(to-input-stream obj)

Implementation detail.

Implementation detail.
source

inheritance-lookupclj

(inheritance-lookup lookup)

Returns an inheritance aware lookup based on lookup that will match subclasses as well as exact matches. Will walk inheritance hierarchy once per new type encountered to find the best match, then cache results.

Returns an inheritance aware lookup based on lookup that will match
subclasses as well as exact matches.  Will walk inheritance hierarchy
once per new type encountered to find the best match, then cache
results.
sourceraw docstring

readclj

(read readable & options)

Convenience method for reading a single fressian object. Takes same options as create-reader. Readable can be any type supported by clojure.java.io/input-stream, or a ByteBuffer.

Convenience method for reading a single fressian object.
Takes same options as create-reader.  Readable can be
any type supported by clojure.java.io/input-stream, or
a ByteBuffer.
sourceraw docstring

read-objectclj

(read-object rdr)

Read a single object from a fressian reader.

Read a single object from a fressian reader.
sourceraw docstring

tagclj

(tag obj)

Returns the tag if object is a tagged-object, else nil.

Returns the tag if object is a tagged-object, else nil.
sourceraw docstring

tagged-object?clj

(tagged-object? o)

Returns true if o is a tagged object, which will occur when the reader does not recognized a specific type. Use tag and tagged-value to access the contents of a tagged-object.

Returns true if o is a tagged object, which will occur when
the reader does not recognized a specific type.  Use tag
and tagged-value to access the contents of a tagged-object.
sourceraw docstring

tagged-valueclj

(tagged-value obj)

Returns the value (an Object arrray) wrapped by obj, or nil if obj is not a tagged object.

Returns the value (an Object arrray) wrapped by obj, or nil
if obj is not a tagged object.
sourceraw docstring

writeclj

(write obj & options)

Convenience method for writing a single object. Returns a byte buffer. Options are the same as for create-reader, with one additional option. If footer? is specified, will write a fressian footer after writing the object.

Convenience method for writing a single object.  Returns a
byte buffer.  Options are the same as for create-reader,
with one additional option.  If footer? is specified, will
write a fressian footer after writing the object.
sourceraw docstring

(write-footer writer)
source

write-objectclj

(write-object writer obj)

Write a single object to a fressian reader. Returns the reader.

Write a single object to a fressian reader. Returns the reader.
sourceraw docstring

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

× close