clojure.edn
edn reading.
Extensible Data Notation is a subset of the Clojure language used as a
data transfer format, designed to be used in a similar way to JSON or
XML.
At some point in your adventures in Clojure land, you’ll want to
deserialize some clojure data structures from a string, and you’ll
want to use clojure.edn/read or
clojure.edn/read-string for that. Do not
use the read-*
functions in clojure.core
to deserialize untrusted Clojure code, as they can be unsafe.
Vars in clojure.edn
r
- read
- Reads the next object from stream, which must be an instance of
java.io.PushbackReader or some derivee. stream defaults to the
current value of *in*.
Reads data in the edn format (subset of Clojure data):
http://edn-format.org
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 symbols to data-reader functions to be considered before default-data-readers.
When not supplied, only the default-data-readers will be used.
: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.
- read-string
- Reads one object from the string s. Returns nil when s is nil or empty.
Reads data in the edn format (subset of Clojure data):
http://edn-format.org
opts is a map as per clojure.edn/read