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) (assert (= "http://www.google.com" (reader/read-string "#URI [http://www.google.com]"))) 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. -- 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