(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
(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
(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
(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)(read-instant-date cs)Faster version of clojure.instant/read-instant-date
Faster version of clojure.instant/read-instant-date
(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))))(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)(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)(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.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |