Coerce a given value, using the provided json schema.
With type: 'json'
This is used to convert json validated with json schema into javascript objects.
Namely it converts all the strings with format date and date-time into Date objects
With type: 'query'
To convert a value coming from a URL query string to the type you want it to be,
for example '12' with type: 'integer' will be converted to 12 so the validation can succeed.
Additionally, we assign default values where appropriate.
Coerce a given value, using the provided json schema.
Additionally, we assign default values where appropriate.