taoensso / nippy

The fastest serialization library for Clojure
https://www.taoensso.com/nippy
Eclipse Public License 1.0
1.04k stars 60 forks source link

Support UUID (and inst)? #170

Closed carrete closed 2 months ago

carrete commented 3 months ago

I'm using carmine and used an uuid as the key in a call to hget with parse-map like:

(fn [k]
  (car/wcar
    opts
    (car/parse-map (car/hget k) :keywordize)))

This "works" in that hget returns the expected value, but the key, an uuid in this case, is returned as nil (because (keyword uuid) returns nil).

Would it be possible, somehow, to support the two built-in tagged elements, uuid and inst? https://github.com/edn-format/edn?tab=readme-ov-file#built-in-tagged-elements

ptaoussanis commented 3 months ago

@carrete Hi Tom,

Nippy already has native support for UUIDs and java.time.Instant, see here.

Could you please open this as an issue under Carmine? And to better understand exactly what trouble you're running into, it'd be helpful if you could please provide a runnable example with the relevant input data - and your expectation for the result you'd like to see.

Thanks

carrete commented 2 months ago

Please see https://github.com/taoensso/carmine/issues/303