Main encoding and decoding namespace.
Main encoding and decoding namespace.
(create-generator writer)
Returns JsonGenerator for given writer.
Returns JsonGenerator for given writer.
(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
(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
(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
(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
(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
(encode obj)
(encode obj opt-map)
Alias to generate-string for clojure-json users
Alias to generate-string for clojure-json users
(encode-smile obj)
(encode-smile obj opt-map)
Alias to generate-smile for clojure-json users
Alias to generate-smile for clojure-json users
(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
Object used to determine end of lazy parsing attempt.
Object used to determine end of lazy parsing attempt.
(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'
(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'
(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'
(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'
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(write obj)
(write obj wholeness)
Write given Clojure object as a piece of data within with-writer. List of wholeness acceptable values:
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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close