Liking cljdoc? Tell your friends :D

framed.std.serialization

Utilities for reading/writing formatted data to disk

In general: reader-like - Anything that can be coerced to an open java.io.Reader using clojure.java.io/reader

writer-like - Anything that can be coerced to an open java.io.Writer using clojure.java.io/writer

istream-like - Anything that can be coerced to an open java.io.InputStream using clojure.java.io/input-stream

ostream-like - Anything that can be coerced to an open java.io.OutputStream using clojure.java.io/output-stream

Utilities for reading/writing formatted data to disk

In general:
  reader-like - Anything that can be coerced to an open java.io.Reader
                using clojure.java.io/reader

  writer-like - Anything that can be coerced to an open java.io.Writer
                using clojure.java.io/writer

  istream-like - Anything that can be coerced to an open java.io.InputStream
                 using clojure.java.io/input-stream

  ostream-like - Anything that can be coerced to an open java.io.OutputStream
                 using clojure.java.io/output-stream
raw docstring

avro-schemaclj

Alias over Abracad for specifying an Avro RecordSchema See https://github.com/damballa/abracad for format documentation Ex: (def schema (avro-schema {:type "record" :name "User" :fields [{:name "age" :type "long"} {:name "email" :type "string"}]})

Alias over Abracad for specifying an Avro RecordSchema
See https://github.com/damballa/abracad for format documentation
Ex:
  (def schema
    (avro-schema {:type "record"
                  :name "User"
                  :fields [{:name "age" :type "long"}
                           {:name "email" :type "string"}]})
sourceraw docstring

coll->FressianSeqclj

(coll->FressianSeq coll)

Construct a reified view of coll (encoded in Fressian) that is is both seqable and accessible as a file on disk

Ex: (def f (coll->FressianSeq [1 2 3 4 5])) (seq f) ; => '(1 2 3 4 5) (clojure.java.io/file f) ; => #<File /tmp/...>

Construct a reified view of coll (encoded in Fressian) that is
is both seqable and accessible as a file on disk

Ex:
  (def f (coll->FressianSeq [1 2 3 4 5]))
  (seq f) ; => '(1 2 3 4 5)
  (clojure.java.io/file f) ; => #<File /tmp/...>
sourceraw docstring

coll->NippySeqclj

(coll->NippySeq coll)

Construct a reified view of coll (encoded in Nippy) that is is both seqable and accessible as a file on disk

Ex: (def n (coll->NippySeq [1 2 3 4 5])) (seq n) ; => '(1 2 3 4 5) (clojure.java.io/file n) ; => #<File /tmp/...>

Construct a reified view of coll (encoded in Nippy) that is
is both seqable and accessible as a file on disk

Ex:
  (def n (coll->NippySeq [1 2 3 4 5]))
  (seq n) ; => '(1 2 3 4 5)
  (clojure.java.io/file n) ; => #<File /tmp/...>
sourceraw docstring

decode-avroclj

:: schema -> bytes -> record

:: schema -> bytes -> record
sourceraw docstring

default-transit-encodingclj

The default encoding used by read-transit and write-transit. Defaults to :msgpack.

The default encoding used by read-transit and write-transit.
Defaults to :msgpack.
sourceraw docstring

encode-avroclj

:: schema -> record -> bytes

:: schema -> record -> bytes
sourceraw docstring

file->FressianSeqclj

(file->FressianSeq x)

Construct a FressianSeq directly from file-like x

Construct a FressianSeq directly from file-like x
sourceraw docstring

file->NippySeqclj

(file->NippySeq x)

Construct a NippySeq directly from file-like x

Construct a NippySeq directly from file-like x
sourceraw docstring

read-avroclj

(read-avro x)

Return a lazy seq of values from Avro-encoded File or InputStream

TODO: if passed an InputStream, will consume entire stream in-memory (arbitrarily large files are safe)

Return a lazy seq of values from Avro-encoded File or InputStream

TODO: if passed an InputStream, will consume entire stream
in-memory (arbitrarily large files are safe)
sourceraw docstring

read-csvclj

(read-csv reader-like)
(read-csv drop-header reader-like)

Return a lazy sequence of rows as vectors of strings drop-header - Boolean, whether or not to ignore header row (default: false)

Return a lazy sequence of rows as vectors of strings
drop-header - Boolean, whether or not to ignore header row (default: false)
sourceraw docstring

read-ednclj

(read-edn reader-like)

Parse the contents of reader-like as a EDN value

Parse the contents of reader-like as a EDN value
sourceraw docstring

read-fressianclj

(read-fressian istream-like)

Return a lazy seq of values from Fressian-encoded input

Return a lazy seq of values from Fressian-encoded input
sourceraw docstring

read-jsonclj

(read-json reader-like)

Parse the contents of reader-like as a JSON value

Parse the contents of reader-like as a JSON value
sourceraw docstring

read-jsonlclj

(read-jsonl reader-like)

Return a lazy sequence of objects from newline-delimited JSON input (JSON Lines) See http://jsonlines.org/

Return a lazy sequence of objects from newline-delimited JSON input
(JSON Lines)
See http://jsonlines.org/
sourceraw docstring

read-nippyclj

(read-nippy istream-like)

Return a lazy seq of values from Nippy-encoded input

Return a lazy seq of values from Nippy-encoded input
sourceraw docstring

read-transitclj

(read-transit istream-like)
(read-transit encoding istream-like)

Parse the contents of reader-like as a Transit value

Parse the contents of reader-like as a Transit value
sourceraw docstring

write-avroclj

(write-avro ostream-like schema coll)

Write coll of records each conforming to schema to ostream-like Ex: (def schema (avro-schema {:type "record" :name "User" :fields [{:name "age" :type "long"} {:name "email" :type "string"}]}) (write-avro "test.avro" schema [{:age 27 :email "foo@example.com"} {:age 32 :email "bar@example.com"}]) ; => #<File test.avro>

Write coll of records each conforming to schema to ostream-like
Ex:
  (def schema
    (avro-schema {:type "record"
                  :name "User"
                  :fields [{:name "age" :type "long"}
                           {:name "email" :type "string"}]})
  (write-avro "test.avro" schema [{:age 27 :email "foo@example.com"}
                                    {:age 32 :email "bar@example.com"}])
  ; => #<File test.avro>
sourceraw docstring

write-csvclj

(write-csv writer-like labels rows)

labels - Seq of column labels, ex ['user_id' 'user_email'] (can be empty) Note that commas and newlines/carriage returns in labels will be replaced with semicolons rows - Seq of row data seqs

labels - Seq of column labels, ex ['user_id' 'user_email'] (can be empty)
         Note that commas and newlines/carriage returns in labels will be
         replaced with semicolons
rows - Seq of row data seqs
sourceraw docstring

write-ednclj

(write-edn ostream-like data)

Write arbitrary data as EDN to ostream-like and return ostream-like

Write arbitrary data as EDN to ostream-like and return ostream-like
sourceraw docstring

write-fressianclj

(write-fressian ostream-like coll)

Write a coll of values as Fressian to ostream-like and return ostream-like

Write a coll of values as Fressian to ostream-like and return ostream-like
sourceraw docstring

write-jsonclj

(write-json writer-like data)

Write arbitrary data as JSON to writer-like and return writer-like

Write arbitrary data as JSON to writer-like and return writer-like
sourceraw docstring

write-jsonlclj

(write-jsonl writer-like coll)

Write arbitrary data as JSONL to writer-like and return writer-like

Write arbitrary data as JSONL to writer-like and return writer-like
sourceraw docstring

write-nippyclj

(write-nippy ostream-like coll)

Write a coll of values as Nippy to ostream-like and return ostream-like

Write a coll of values as Nippy to ostream-like and return ostream-like
sourceraw docstring

write-transitclj

(write-transit ostream-like data)
(write-transit ostream-like encoding data)

encoding - one of :json, :msgpack

encoding - one of :json, :msgpack
sourceraw docstring

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

× close