True.
I guess I’m still struggling with which kinds of “parsing” are appropriate to do with spec and which aren’t.
Differentiating between different shapes of data seems like something you could achieve with it via s/or
and s/conform
.
But you could also do that kind of thing with match
, or with plain old Clojure.
Is there an example of how I might use spec to ensure that a field is in OffsetDateTime format?
#(instance? OffsetDateTime %)
?
oooh
will try that
Sorta gets me there, the field is a string, so I think I'll have to do some extra magic
probably need to use a parser then
which is part of the java time library
kk
thanks for the pointer 🙂