Welcome! Please see the About page for a little more info on how this works.

+1 vote
ago in Docs by
edited ago by

user=> (doc clojure.edn/read-string)
-------------------------
clojure.edn/read-string
([s] [opts s])

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

Note Returns nil when s is nil or empty.. But when called with opts without explicit :eof it throws EOF error

user=> (clojure.edn/read-string {} "")
Execution error at user/eval222 (REPL:1).
EOF while reading

And without options it returns nil as expected

user=> (clojure.edn/read-string "")
nil

Please log in or register to answer this question.

...