From 9d2dbafdb5db886a57f44c5b7fe32c824713e6c7 Mon Sep 17 00:00:00 2001 From: Peter Selby Date: Sat, 12 Jun 2021 22:42:59 -0700 Subject: [PATCH] Add serialization for BigDecimal --- src/valuehash/impl.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/valuehash/impl.clj b/src/valuehash/impl.clj index 42e4888..a8562be 100644 --- a/src/valuehash/impl.clj +++ b/src/valuehash/impl.clj @@ -108,4 +108,7 @@ (map map-entry->byte-array) (sort ba-comparator) (cons map-sep) - (join-byte-arrays)))) + (join-byte-arrays))) + java.math.BigDecimal + (to-byte-array [this] + (.getBytes (.toString this))))