Clojure data into JSON and back with spec and Liberator

As noted in this StackOverflow answer, which also links to this mailing list thread: Clojure.spec is not intended for coercion. The approach recommended by the core team is to use plain functions to coerce data before validating with spec.

We have not transitioned from schema to clojure.spec yet, but I imagine that if/when the time comes we will keep schema as the library in use for coercing input at the boundaries of our APIs, and just use clojure.spec for describing the shape of data at key points in the code base. This answer by @didibus is what I would use as a reference for which functions to spec when the time comes.