Liking cljdoc? Tell your friends :D

cheshire.core

Main encoding and decoding namespace.

Main encoding and decoding namespace.
raw docstring

*generator*clj

source

*opt-map*clj

source

copy-arglistscljmacro

(copy-arglists dst src)
source

create-generatorclj

(create-generator writer)

Returns JsonGenerator for given writer.

Returns JsonGenerator for given writer.
sourceraw docstring

create-pretty-printerclj

(create-pretty-printer options)

Returns an instance of CustomPrettyPrinter based on the configuration provided as argument

Returns an instance of CustomPrettyPrinter based on the configuration
provided as argument
sourceraw docstring

decodeclj

(decode string)
(decode string key-fn)
(decode string key-fn array-coerce-fn)

Alias to parse-string for clojure-json users

Alias to parse-string for clojure-json users
sourceraw docstring

decode-smileclj

(decode-smile bytes)
(decode-smile bytes key-fn)
(decode-smile bytes key-fn array-coerce-fn)

Alias to parse-smile for clojure-json users

Alias to parse-smile for clojure-json users
sourceraw docstring

decode-streamclj

(decode-stream rdr)
(decode-stream rdr key-fn)
(decode-stream rdr key-fn array-coerce-fn)

Alias to parse-stream for clojure-json users

Alias to parse-stream for clojure-json users
sourceraw docstring

decode-strictclj

(decode-strict string)
(decode-strict string key-fn)
(decode-strict string key-fn array-coerce-fn)

Alias to parse-string-strict for clojure-json users

Alias to parse-string-strict for clojure-json users
sourceraw docstring

default-pretty-print-optionsclj

source

encodeclj

(encode obj)
(encode obj opt-map)

Alias to generate-string for clojure-json users

Alias to generate-string for clojure-json users
sourceraw docstring

encode-smileclj

(encode-smile obj)
(encode-smile obj opt-map)

Alias to generate-smile for clojure-json users

Alias to generate-smile for clojure-json users
sourceraw docstring

encode-streamclj

(encode-stream obj writer)
(encode-stream obj writer opt-map)

Alias to generate-stream for clojure-json users

Alias to generate-stream for clojure-json users
sourceraw docstring

eofclj

Object used to determine end of lazy parsing attempt.

Object used to determine end of lazy parsing attempt.
sourceraw docstring

generate-cborclj

(generate-cbor obj)
(generate-cbor obj opt-map)

Returns a CBOR-encoded byte-array for the given Clojure object. Takes an optional date format string that Date objects will be encoded with.

The default date format (in UTC) is: yyyy-MM-dd'T'HH:mm:ss'Z'

Returns a CBOR-encoded byte-array for the given Clojure object.
Takes an optional date format string that Date objects will be encoded with.

The default date format (in UTC) is: yyyy-MM-dd'T'HH:mm:ss'Z'
sourceraw docstring

generate-smileclj

(generate-smile obj)
(generate-smile obj opt-map)

Returns a SMILE-encoded byte-array for the given Clojure object. Takes an optional date format string that Date objects will be encoded with.

The default date format (in UTC) is: yyyy-MM-dd'T'HH:mm:ss'Z'

Returns a SMILE-encoded byte-array for the given Clojure object.
Takes an optional date format string that Date objects will be encoded with.

The default date format (in UTC) is: yyyy-MM-dd'T'HH:mm:ss'Z'
sourceraw docstring

generate-streamclj

(generate-stream obj writer)
(generate-stream obj writer opt-map)

Returns a BufferedWriter for the given Clojure object with the JSON-encoded data written to the writer. Takes an optional date format string that Date objects will be encoded with.

The default date format (in UTC) is: yyyy-MM-dd'T'HH:mm:ss'Z'

Returns a BufferedWriter for the given Clojure object with the JSON-encoded
data written to the writer. Takes an optional date format string that Date
objects will be encoded with.

The default date format (in UTC) is: yyyy-MM-dd'T'HH:mm:ss'Z'
sourceraw docstring

generate-stringclj

(generate-string obj)
(generate-string obj opt-map)

Returns a JSON-encoding String for the given Clojure object. Takes an optional date format string that Date objects will be encoded with.

The default date format (in UTC) is: yyyy-MM-dd'T'HH:mm:ss'Z'

Returns a JSON-encoding String for the given Clojure object. Takes an
optional date format string that Date objects will be encoded with.

The default date format (in UTC) is: yyyy-MM-dd'T'HH:mm:ss'Z'
sourceraw docstring

parse-cborclj

(parse-cbor bytes)
(parse-cbor bytes key-fn)
(parse-cbor bytes key-fn array-coerce-fn)

Returns the Clojure object corresponding to the given CBOR-encoded bytes. An optional key-fn argument can be either true (to coerce keys to keywords), false to leave them as strings, or a function to provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field, and returning the collection to be used for array values.

Returns the Clojure object corresponding to the given CBOR-encoded bytes.
An optional key-fn argument can be either true (to coerce keys to keywords),
false to leave them as strings, or a function to provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field,
and returning the collection to be used for array values.
sourceraw docstring

parse-smileclj

(parse-smile bytes)
(parse-smile bytes key-fn)
(parse-smile bytes key-fn array-coerce-fn)

Returns the Clojure object corresponding to the given SMILE-encoded bytes. An optional key-fn argument can be either true (to coerce keys to keywords), false to leave them as strings, or a function to provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field, and returning the collection to be used for array values.

Returns the Clojure object corresponding to the given SMILE-encoded bytes.
An optional key-fn argument can be either true (to coerce keys to keywords),
false to leave them as strings, or a function to provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field,
and returning the collection to be used for array values.
sourceraw docstring

parse-streamclj

(parse-stream rdr)
(parse-stream rdr key-fn)
(parse-stream rdr key-fn array-coerce-fn)

Returns the Clojure object corresponding to the given reader, reader must implement BufferedReader. An optional key-fn argument can be either true (to coerce keys to keywords),false to leave them as strings, or a function to provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field, and returning the collection to be used for array values.

If the top-level object is an array, it will be parsed lazily (use `parse-strict' if strict parsing is required for top-level arrays.

If multiple objects (enclosed in a top-level `{}' need to be parsed lazily, see parsed-seq.

Returns the Clojure object corresponding to the given reader, reader must
implement BufferedReader. An optional key-fn argument can be either true (to
coerce keys to keywords),false to leave them as strings, or a function to
provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field,
and returning the collection to be used for array values.

If the top-level object is an array, it will be parsed lazily (use
`parse-strict' if strict parsing is required for top-level arrays.

If multiple objects (enclosed in a top-level `{}' need to be parsed lazily,
see parsed-seq.
sourceraw docstring

parse-stream-strictclj

(parse-stream-strict rdr)
(parse-stream-strict rdr key-fn)
(parse-stream-strict rdr key-fn array-coerce-fn)

Returns the Clojure object corresponding to the given reader, reader must implement BufferedReader. An optional key-fn argument can be either true (to coerce keys to keywords),false to leave them as strings, or a function to provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field, and returning the collection to be used for array values.

Does not lazily parse top-level arrays.

Returns the Clojure object corresponding to the given reader, reader must
implement BufferedReader. An optional key-fn argument can be either true (to
coerce keys to keywords),false to leave them as strings, or a function to
provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field,
and returning the collection to be used for array values.

Does not lazily parse top-level arrays.
sourceraw docstring

parse-stringclj

(parse-string string)
(parse-string string key-fn)
(parse-string string key-fn array-coerce-fn)

Returns the Clojure object corresponding to the given JSON-encoded string. An optional key-fn argument can be either true (to coerce keys to keywords), false to leave them as strings, or a function to provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field, and returning the collection to be used for array values.

If the top-level object is an array, it will be parsed lazily (use `parse-strict' if strict parsing is required for top-level arrays.

Returns the Clojure object corresponding to the given JSON-encoded string.
An optional key-fn argument can be either true (to coerce keys to keywords),
false to leave them as strings, or a function to provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field,
and returning the collection to be used for array values.

If the top-level object is an array, it will be parsed lazily (use
`parse-strict' if strict parsing is required for top-level arrays.
sourceraw docstring

parse-string-strictclj

(parse-string-strict string)
(parse-string-strict string key-fn)
(parse-string-strict string key-fn array-coerce-fn)

Returns the Clojure object corresponding to the given JSON-encoded string. An optional key-fn argument can be either true (to coerce keys to keywords), false to leave them as strings, or a function to provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field, and returning the collection to be used for array values.

Does not lazily parse top-level arrays.

Returns the Clojure object corresponding to the given JSON-encoded string.
An optional key-fn argument can be either true (to coerce keys to keywords),
false to leave them as strings, or a function to provide custom coercion.

The array-coerce-fn is an optional function taking the name of an array field,
and returning the collection to be used for array values.

Does not lazily parse top-level arrays.
sourceraw docstring

parsed-seqclj

(parsed-seq reader)
(parsed-seq reader key-fn)
(parsed-seq reader key-fn array-coerce-fn)

Returns a lazy seq of Clojure objects corresponding to the JSON read from the given reader. The seq continues until the end of the reader is reached.

The array-coerce-fn is an optional function taking the name of an array field, and returning the collection to be used for array values. If non-laziness is needed, see parse-stream.

Returns a lazy seq of Clojure objects corresponding to the JSON read from
the given reader. The seq continues until the end of the reader is reached.

The array-coerce-fn is an optional function taking the name of an array field,
and returning the collection to be used for array values.
If non-laziness is needed, see parse-stream.
sourceraw docstring

parsed-smile-seqclj

(parsed-smile-seq reader)
(parsed-smile-seq reader key-fn)
(parsed-smile-seq reader key-fn array-coerce-fn)

Returns a lazy seq of Clojure objects corresponding to the SMILE read from the given reader. The seq continues until the end of the reader is reached.

The array-coerce-fn is an optional function taking the name of an array field, and returning the collection to be used for array values.

Returns a lazy seq of Clojure objects corresponding to the SMILE read from
the given reader. The seq continues until the end of the reader is reached.

The array-coerce-fn is an optional function taking the name of an array field,
and returning the collection to be used for array values.
sourceraw docstring

with-writercljmacro

(with-writer [writer opt-map] & body)

Start writing for series objects using the same json generator. Takes writer and options map as arguments. Expects its body as sequence of write calls. Returns a given writer.

Start writing for series objects using the same json generator.
Takes writer and options map as arguments.
Expects its body as sequence of write calls.
Returns a given writer.
sourceraw docstring

writeclj

(write obj)
(write obj wholeness)

Write given Clojure object as a piece of data within with-writer. List of wholeness acceptable values:

  • no value - the same as :all
  • :all - write object in a regular way with start and end borders
  • :start - write object with start border only
  • :start-inner - write object and its inner object with start border only
  • :end - write object with end border only.
Write given Clojure object as a piece of data within with-writer.
List of wholeness acceptable values:
- no value - the same as :all
- :all - write object in a regular way with start and end borders
- :start - write object with start border only
- :start-inner - write object and its inner object with start border only
- :end - write object with end border only.
sourceraw docstring

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

× close