Hi, The EDN reader (both clojure.tools.reader.edn and clojure.edn) don't read record/type literals by design.
You need to use the clojure reader for that or read them as tagged literals. Joachim De Beule writes: > Hi List, > > As documented at http://clojure.org/reader, defining a record with > defrecord also installs a reader form, e.g.: > > (ns test) > (defrecord X [a b]) > (read-string "#test.X{:a :foo, :b :bar}) > => test.X{:a :foo, :b :bar} > > However, the record reader form does not seem to be visible > to clojure.tools.reader.edn/read-str: > > (clojure.tools.reader.edn/read-str "#test.X{:a :foo, :b :bar}) > => ExceptionInfo No reader function for tag test.X ... > > So my questions are: > > 1) Is it really required that any non-standard reader-forms are passed to > clojure.tools.reader.edn/read-str > (via the :readers option)? and > > 2) If so, how do I get to the reader-forms of clojure.core/read-str, e.g. > for reading records? > > Thanks! > Joachim. > > -- -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.