So what's the recommended way to serialize, then? It used to be that binding *print-dup* to true was the recommended way, but last I checked, that technique didn't work for things like records.
Remember, it's not just about serializing an individual record, it's about serializing an arbitrary piece of Clojure data, which might be an aggregate of a record inside a map inside a vector with metadata, for example. I got the impression that things regarding serialization were in flux, with new constructs like records not supporting the old way of doing things, but not everything converted into the "new way" whatever that is. If I'm wrong, and this is all now resolved, I'd love to hear about it. On Thu, Jan 27, 2011 at 6:24 PM, Ken Wesson <kwess...@gmail.com> wrote: > On Thu, Jan 27, 2011 at 6:24 PM, Mark Engelberg > <mark.engelb...@gmail.com> wrote: > > Records don't have serialization yet, do they? > > user=> (defrecord Foo [n]) > user.Foo > user=> ((supers Foo) java.io.Serializable) > java.io.Serializable > > Looks like they do. And if they didn't, > > (defrecord Foo [n] > java.io.Serializable) > > would probably have rectified that. > > Unless you need a custom readResolve or writeObject method, of course. > > -- 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