Transit's UUID stores the byte representation and provides methods for accessing the lower and higher bits, cljs.core's UUID is just a simple wrapper around a string.
Transit provides a uuid? predicate for this reason. Though perhaps it would be better to provide a marker protocol in cljs.core instead for this case a la IRecord and test this in cljs.core/uuid? David On Sat, Sep 26, 2015 at 6:13 PM, Jamie Orchard-Hays <[email protected]> wrote: > Why *does* Transit have another UUID type? I was surprised to see that. > > > > On Sep 26, 2015, at 6:06 PM, Nikita Prokopov <[email protected]> wrote: > > > > Having two UUID types around is not a good idea. Transit shouldn’t have > its own type, but since it’s there, I recommend re-configure transit reader > to always read native CLJS UUIDs: > > > > (defn read-transit-str [s] > > (t/read (t/reader :json { :handlers {"u" cljs.core/uuid} }) s)) > > > > You‘ll save yourself A LOT of headache, trust me > > > > -- > > Note that posts from new members are moderated - please be patient with > your first post. > > --- > > You received this message because you are subscribed to the Google > Groups "ClojureScript" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/clojurescript. > > -- > Note that posts from new members are moderated - please be patient with > your first post. > --- > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/clojurescript. > -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
