Closed escherize closed 1 year ago
It's not transformer, it's the schema creation (m/decode
accepts both data and schema instances, in case of data, it call m/schema
which fails here).
Try:
(m/schema :sequential)
Instead you should:
(m/schema [:sequential :any])
Thanks!
some interesting behavior with decode. It has to do with what happens when a transformer throws.
minimal example:
(mc/decode :sequential "32" (mtx/string-transformer))
It came up inside a usage with an
:or
like this:(mc/decode [:or :sequential :int] "32" (mtx/string-transformer))
Which you’d expect would return
32
, but no. it throws with:I think to fix it we'd have to either: