Fork me on GitHub
#malli
<
2022-07-14
>
Loic04:07:20

I have a question regarding key-transform and :map-of : I have map keys that are list and I want to turn that list into vector of vector. But I struggle to make a basic transformation work such as just turning keys into string in case of use of :map-of

;;work

(m/decode
 [:map [:smth :int]]
 {:a 2}
 (mt/key-transformer {:decode name}))
=> {"a" 2}

;; does not work
(m/decode
 [:map-of any? int?]
 {:a 2}
 (mt/key-transformer {:decode name}))
=> {:a 2}