Liking cljdoc? Tell your friends :D

scjsv.core

Use validator, json-validator, or json-reader-validator to construct a validator function.

Validator functions

The first argument for the validator function is the data. The optional second argument is an options map with the following keys:

keydefaultdescription
:deep-checkfalseCheck nested elements even if the parent elements are invalid.
Use [[validator]], [[json-validator]], or [[json-reader-validator]] to
construct a validator function.

### Validator functions

The first argument for the validator function is the data. The optional second
argument is an options map with the following keys:

| key           | default  | description |
|---------------|----------|-------------|
| `:deep-check` | `false`  | Check nested elements even if the parent elements are invalid.
raw docstring

json-reader-validatorclj

(json-reader-validator schema)
(json-reader-validator schema json-schema-factory)

Returns a java.io.Reader validator function. Schema can be given either as a JSON String or a Clojure map.

To configure the validator, you can pass a JsonSchemaFactory instance or a options map as the second parameter. See scjsv.core/validator docstring for the options.

Returns a `java.io.Reader` validator function. Schema can be given either as
a JSON String or a Clojure map.

To configure the validator, you can pass a `JsonSchemaFactory` instance or a
options map as the second parameter. See [[scjsv.core/validator]] docstring for
the options.
sourceraw docstring

json-validatorclj

(json-validator schema)
(json-validator schema json-schema-factory)

Returns a JSON string validator function. Schema can be given either as a JSON String or a Clojure map.

To configure the validator, you can pass a JsonSchemaFactory instance or a options map as the second parameter. See scjsv.core/validator docstring for the options.

Returns a JSON string validator function. Schema can be given either as a
JSON String or a Clojure map.

To configure the validator, you can pass a `JsonSchemaFactory` instance or a
options map as the second parameter. See [[scjsv.core/validator]] docstring for
the options.
sourceraw docstring

validatorclj

(validator schema)
(validator schema json-schema-factory)

Returns a Clojure data structure validator function. Schema can be given either as a JSON String or a Clojure map.

To configure the validator, you can pass a JsonSchemaFactory instance or an options map as the second parameter. The options map can have the following keys:

keydefaultdescription
:dereferencing:canonicalWhich dereferencing mode to use. Either :canonical or :inline.
:deep-checkfalseCheck nested elements even if the parent elements are invalid.

Note that you can't pass a JsonSchemaFactory instance and enable :deep-check at once. If you need this, pass {:deep-check true} as the second argument to the validator function.

Returns a Clojure data structure validator function. Schema can be given
either as a JSON String or a Clojure map.

To configure the validator, you can pass a `JsonSchemaFactory` instance or an
options map as the second parameter. The options map can have the following
keys:

| key              | default      | description  |
|------------------|--------------|--------------|
| `:dereferencing` | `:canonical` | Which dereferencing mode to use. Either `:canonical` or `:inline`.
| `:deep-check`    | `false`      | Check nested elements even if the parent elements are invalid.

Note that you can't pass a `JsonSchemaFactory` instance and enable
`:deep-check` at once. If you need this, pass `{:deep-check true}` as the
second argument to the validator function.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close