I've used print-dup and read for saving and restoring data and it
worked well for me once I defined the needed print-dup methods.
Since you said it's ok for you to read your struct back in as a hash
map, you can do the following:
(defmethod print-dup clojure.lang.PersistentStructMap [o w] (print-
method o w))
Then when you execute your print-dup:
user> (defstruct s :key)
#'user/s
user> (binding [*print-dup* true] (print-str (struct s)))
"{:key nil}"
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---