This kind'a trips me up a bit:
(spec-tools.core/conform (spec/or :string string?) "foo")
;; => [:string "foo"]
I really don't care about the type here, so I was expecting it to only return "foo". I see that spec does this, but I'm using this in a coercing context, and my app is expecting "foo", not information about the type.
so, I'm actually doing this:
(spec-tools.core/conform (spec/or :string string? :number number?) "foo" spec-tools.core/json-conforming)
maybe a spec-tools.core/coerce
would be nice? which does the coercion?