The edn format does not include records. The transit README gives an example of how to write a transit handler for a record. See the section on extensibility.
https://github.com/cognitect/transit-format#extensibility <https://github.com/cognitect/transit-format#extensibility> Before transit existed, there was a little library that I used to encode a Clojure record as a tagged literal (for edn compatibility). It’s only for the Clojure side at the moment, but I imagine it wouldn’t be hard to port to CLJS. However, I suggest that you use transit. https://github.com/miner/tagged <https://github.com/miner/tagged> > On Feb 24, 2015, at 4:40 PM, Colin Yates <colin.ya...@gmail.com> wrote: > > I am sending instances of defrecords from clojurescript via transmit/edn and > getting: > > 2015-Feb-24 19:23:52 +0000 dev-os-mbp.local DEBUG [taoensso.sente] - Bad > package: [[:client/message #health.shared.domain.PingCommand{}]] > (clojure.lang.ExceptionInfo: No reader function for tag > health.shared.domain.PingCommand {:type :reader-exception}) > > The defrecord is defined using cljx and is definitely there on the server. > > Do I need to write a reader function to recognise instances of defrecord - my > assumption was that this should just work? > > Thanks! -- 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/d/optout.