I have a record, an instance of and I print it to EDN string:
(ns my)
(defrecord Ref [type id])
(def rich (->Ref :Person 42)
(pr-str rich)
I would like to get "#my.Ref [:Person 42]
.
But I get "#my.Ref{:type :Person, :id 23}"
.
Sow how can I plug in my custom implementation for printing instances of Ref
?
In CLJS this is done via the
cljs.core/IPrintWithWriter
protocol.In CLJ it is done via the
clojure.core/print-method
multimethod.