I am looking for a way to transfer URI objects from a clojure client to a clojurescript client. The printed representation of a java.net.URI object is #<URI "http//
www.example.com> The problem is that I can't read in this data when it's structured like that. For example, I'd like to be able to pass this data strucutre to the client {:uri #<URI
http://www.google.com>}. From my understanding, the extensible reader needs something in the form of #symbol [value].
I know how to extend the clojurescript reader:
(defn make-url [stuff]
(str (first stuff)))
(reader/register-tag-parser! 'URI make-url)
I know that I could just map over the data structure and convert the uris to strings, and then send that to the client, but it seems like there should be a better way.