You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sending data from a node js client encoded with transit and persisting in Datomic, however since transit-js appears to not have support for a explicit transit.double type, Datomic will error any time I try persist data with a float that happens to be an integer, because it is decoded in transit-clj as an integer.
I've worked around this by creating a new class, and creating a custom handler that returns the encoded double via the rep method on the handler interface:
This seems to be the only way I can get transit-js to correctly encode float types. It seems like there should be a transit.double method that will force the long-form encoding of doubles so the type information isn't lost in transit.
The text was updated successfully, but these errors were encountered:
I'm sending data from a node js client encoded with transit and persisting in Datomic, however since transit-js appears to not have support for a explicit
transit.double
type, Datomic will error any time I try persist data with a float that happens to be an integer, because it is decoded in transit-clj as an integer.I've worked around this by creating a new class, and creating a custom handler that returns the encoded double via the
rep
method on the handler interface:This seems to be the only way I can get transit-js to correctly encode float types. It seems like there should be a
transit.double
method that will force the long-form encoding of doubles so the type information isn't lost in transit.The text was updated successfully, but these errors were encountered: