Byte arrays -> Uint8Array and comparability
Closed this issue · 1 comments
kamituel commented
When encoding a byte array with transit-clj, and then decoding it with transit-cljs, a Uint8Array
type is used. This breaks several things, i.e. such data structures cannot be compared:
- using
=
(can get around that withextend-type
, usearray-seq
in there) - using
set/difference
(can't get around that, as it usesidentical?
).
(One possible solution would be to provide custom handler for "b"
, but it is currently prohibited in transit.impl.decoder
in transit-js
library - the "Cannot override handler for ground type "b")"
exception is being thrown.)
swannodette commented
You cannot compare primitive arrays in Java / Clojure either.