cognitect / transit-cljs

Transit for ClojureScript
http://transit-format.org
Apache License 2.0
323 stars 20 forks source link

Byte arrays -> Uint8Array and comparability #35

Closed kamituel closed 2 years ago

kamituel commented 7 years ago

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:

(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 2 years ago

You cannot compare primitive arrays in Java / Clojure either.