Here is what I came up with (defmethod print-method java.net.URI [x w]
(print-method (symbol (format "#uri [%s]" (symbol (str x w))
(pr-str (java.net.URI. "www.google.com"))
"#uri [http://www.google.com";
If used with the cljs parser from above, it works. Thanks
On Wednesday, January 9,
It's not going to be easy to read the #
> The URIs are coming from a datomic database that actually stores the
> values as java.net.URIs. All I'm doing is transferring the query values
> from the database to the client. The server uses pr-str before sending
> back the results, and the client u
The URIs are coming from a datomic database that actually stores the values
as java.net.URIs. All I'm doing is transferring the query values from the
database to the client. The server uses pr-str before sending back the
results, and the client uses reader/read-string to get the results.
On
why not just print/send your uris as strings?
you only need a reader tag if you want to read/interpret it in a particular
way at read time in the client. do you want to do this?
D
On Thursday, 10 January 2013 12:20:53 UTC+11, Taylor Sando wrote:
>
> I am looking for a way to transfer URI objec
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 # 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