-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
URIs as tagged values aren't very useful generally speaking, so right now I'm doing:
(deftype URIHandler []
Object
(tag [this v] "r")
(rep [this v] (.toString v))
(stringRep [this v] nil))
(def transit-reader
(transit/reader :json
{:handlers
{"r" (fn [uri] (Uri. uri))}}))
(def transit-writer
(transit/writer :json
{:handlers
{goog.Uri (URIHandler.)}}))Would be nice to actually have this built into transit-cljs, though I'm not sure what the implications for running anywhere that goog.closure has a hard time reaching (self-hosting issue?).
Metadata
Metadata
Assignees
Labels
No labels