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 \w schema `set?` doesn't result in set #831

Closed jasonjckn closed 1 year ago

jasonjckn commented 1 year ago

Is this correct behaviour?

(m/decode set? ["hi"] mt/json-transformer)
;; => ["hi"]

I was expecting behaviour on par with :set

(m/decode [:set string?] ["hi"] mt/json-transformer)
;; => #{"hi"}

I'm new to malli, feel free to close if intentional.

ikitommi commented 1 year ago

with latest version:

(m/decode [:set string?] ["hi"] mt/json-transformer)
;; => #{"hi"}