Liking cljdoc? Tell your friends :D

fast-edn.core


construct-dateclj

(construct-date years
                months
                days
                hours
                minutes
                seconds
                nanoseconds
                offset-sign
                offset-hours
                offset-minutes)

Construct a java.util.Date, which expresses the original instant as milliseconds since the epoch, UTC. Faster version of clojure.instant/construct-date

Construct a java.util.Date, which expresses the original instant as milliseconds since the epoch, UTC.
Faster version of clojure.instant/construct-date
sourceraw docstring

construct-instantclj

(construct-instant years
                   months
                   days
                   hours
                   minutes
                   seconds
                   nanoseconds
                   offset-sign
                   offset-hours
                   offset-minutes)

Construct a java.time.Instant

Construct a java.time.Instant
sourceraw docstring

default-data-readersclj

source

parse-timestampclj

(parse-timestamp new-instant cs)

Parse a string containing an RFC3339-like like timestamp. Faster version of clojure.instant/parse-timestamp

Parse a string containing an RFC3339-like like timestamp.
Faster version of clojure.instant/parse-timestamp
sourceraw docstring

parserclj

(parser source)
(parser opts source)

Creates a parser that can be reused. Useful for performance optimisations (together with set-reader) or for reading multiple objects from same Reader.

Source can be Reader, InputStream, File, byte[], char[], String.

opts is a map that can include the following keys:

:eof - Value to return on end-of-file. When not supplied, eof throws an exception. :readers - A map of tag symbol -> data-reader fn to be considered before default-data-readers :default - A function of two args, that will, if present and no reader is found for a tag, be called with the tag and the value :buffer - Int, size of buffer to read from source (1024 by default) :count-lines - Boolean, whether to report line/column numbers in exceptions (false by default)

Creates a parser that can be reused. Useful for performance optimisations
(together with `set-reader`) or for reading multiple objects from same Reader.

Source can be Reader, InputStream, File, byte[], char[], String.

opts is a map that can include the following keys:

  :eof         - Value to return on end-of-file. When not supplied, eof throws
                 an exception.
  :readers     - A map of tag symbol -> data-reader fn to be considered
                 before default-data-readers
  :default     - A function of two args, that will, if present and no reader is
                 found for a tag, be called with the tag and the value
  :buffer      - Int, size of buffer to read from source (1024 by default)
  :count-lines - Boolean, whether to report line/column numbers in exceptions
                 (false by default)
sourceraw docstring

read-instant-dateclj

(read-instant-date cs)

Faster version of clojure.instant/read-instant-date

Faster version of clojure.instant/read-instant-date
sourceraw docstring

(read-next parser)

For cases when you need to read multiple objects from the same Reader:

(let [p (parser {:eof ::eof} reader)] (while (not= ::eof (read-next p))))

For cases when you need to read multiple objects from the same Reader:

(let [p (parser {:eof ::eof} reader)]
  (while (not= ::eof (read-next p))))
sourceraw docstring

read-onceclj

(read-once source)
(read-once opts source)

Reads one object from source. Source can be Reader, InputStream, File, byte[], char[], String. Closes source afterwards. Throws if empty.

Source can be Reader, InputStream, File, byte[], char[], String.

opts is a map that can include the following keys:

:eof - Value to return on end-of-file. When not supplied, eof throws an exception. :readers - A map of tag symbol -> data-reader fn to be considered before default-data-readers :default - A function of two args, that will, if present and no reader is found for a tag, be called with the tag and the value :buffer - Int, size of buffer to read from source (1024 by default) :count-lines - Boolean, whether to report line/column numbers in exceptions (false by default)

Reads one object from source. Source can be Reader, InputStream, File,
byte[], char[], String. Closes source afterwards. Throws if empty.

Source can be Reader, InputStream, File, byte[], char[], String.

opts is a map that can include the following keys:

  :eof         - Value to return on end-of-file. When not supplied, eof throws
                 an exception.
  :readers     - A map of tag symbol -> data-reader fn to be considered
                 before default-data-readers
  :default     - A function of two args, that will, if present and no reader is
                 found for a tag, be called with the tag and the value
  :buffer      - Int, size of buffer to read from source (1024 by default)
  :count-lines - Boolean, whether to report line/column numbers in exceptions
                 (false by default)
sourceraw docstring

read-stringclj

(read-string s)
(read-string opts s)

Reads one object from the string s. Returns nil when s is nil or empty.

Reads data in the EDN format: https://github.com/edn-format/edn

opts is a map that can include the following keys:

:eof - Value to return on end-of-file. When not supplied, eof throws an exception. :readers - A map of tag symbol -> data-reader fn to be considered before default-data-readers :default - A function of two args, that will, if present and no reader is found for a tag, be called with the tag and the value :buffer - Int, size of buffer to read from source (1024 by default) :count-lines - Boolean, whether to report line/column numbers in exceptions (false by default)

Reads one object from the string s. Returns nil when s is nil or empty.

Reads data in the EDN format: https://github.com/edn-format/edn

opts is a map that can include the following keys:

  :eof         - Value to return on end-of-file. When not supplied, eof throws
                 an exception.
  :readers     - A map of tag symbol -> data-reader fn to be considered
                 before default-data-readers
  :default     - A function of two args, that will, if present and no reader is
                 found for a tag, be called with the tag and the value
  :buffer      - Int, size of buffer to read from source (1024 by default)
  :count-lines - Boolean, whether to report line/column numbers in exceptions
                 (false by default)
sourceraw docstring

readerclj

(reader source)
source

set-readerclj

(set-reader parser source)

Reuses parser with all its options and allocated buffers.

Source can be Reader, InputStream, File, byte[], char[], String.

Reuses parser with all its options and allocated buffers.

Source can be Reader, InputStream, File, byte[], char[], String.
sourceraw docstring

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

× close