edn

How to use clojure.edn/read to get a sequence of objects in a file?

Clojure 1.5 introduced clojure.edn , which includes a read function that requires a PushbackReader . If I want to read the first five objects, I can do: (with-open [infile (java.io.PushbackReader. (clojure.java.io/reader "foo.txt"))] (binding [*in* infile] (let [edn-seq (repeatedly clojure.edn/read)...

Clojure & ClojureScript: clojure.core/read-string, clojure.edn/read-string and cljs.reader/read-string

I am not clear about the relationship between all these read-string functions. Well, it is clear that clojure.core/read-string can read any serialized string that is output by pr[n] or even print-dup . It is also clear that clojure.edn/read-string does read strings that are formatted according to...