How do I extend clojure.contribs json writer to serialize other classes
I need to create JSON objects from clojure maps that store things like clojure vars.  The base implementation throws this kind of error when it sees them:

java.lang.Exception: Don't know how to write JSON of class clojure.lang.Var

Can anybody point me to sample code on how to extend the capabilities of the JSON writer?

Thanks.


How do I extend clojure.contribs json writer to serialize other classes
===

I need to create JSON objects from clojure maps that store things like clojure vars.  The base implementation throws this kind of error when it sees them:

java.lang.Exception: Don't know how to write JSON of class clojure.lang.Var

Can anybody point me to sample code on how to extend the capabilities of the JSON writer?

Thanks.

