Parse bigints as integers.

This commit is contained in:
Andrey Antukh 2021-01-27 15:05:05 +01:00
parent af478c83cd
commit 1c098d9b04
2 changed files with 7 additions and 1 deletions

View file

@ -37,6 +37,11 @@
;; --- Transit adapters
(def bigint-read-handler
(t/read-handler
(fn [value]
(js/parseInt value 10))))
(def point-write-handler
(t/write-handler
(constantly "point")
@ -69,6 +74,7 @@
(def ^:privare +read-handlers+
{"u" uuid
"n" bigint-read-handler
"ordered-set" ordered-set-read-handler
"jsonblob" blob-read-handler
"matrix" matrix-read-handler