metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.46k stars 208 forks source link

decoding enum of keywords issue (?) #830

Closed jasonjckn closed 1 year ago

jasonjckn commented 1 year ago

Is this correct behaviour?

(m/decode [:enum :dev] "dev" mt/json-transformer)
;; => "dev" 

I was expecting :dev (much like if you had schema :keyword).

I'm new to Malli, feel free to close issue if this is intentional.

ikitommi commented 1 year ago

Did you try with latest version? should work with that.

ikitommi commented 1 year ago

with latest version:

(m/decode [:enum :dev] "dev" mt/json-transformer)
;; => :dev