Loads canonical JSON Schemas and validates payloads against their roots or definitions.
schema/common.json supplies shared definitions. Raw validators reject values outside
the JSON data model; engine adapters may normalize keyword maps before validation.
Loads canonical JSON Schemas and validates payloads against their roots or definitions. `schema/common.json` supplies shared definitions. Raw validators reject values outside the JSON data model; engine adapters may normalize keyword maps before validation.
(clip-name text)text cut to most_name_chars code points, so a cut never splits a character.
`text` cut to `most_name_chars` code points, so a cut never splits a character.
(explain document-name value)(explain document-name definition value)JSON Schema errors for value, or nil when it satisfies the document root or
named definition. Clojure keyword maps are normalized to their JSON spelling
before definition validation.
JSON Schema errors for `value`, or nil when it satisfies the document root or named definition. Clojure keyword maps are normalized to their JSON spelling before definition validation.
(explain-json document-name definition value)JSON Schema errors without converting Clojure values into JSON spellings.
JSON Schema errors without converting Clojure values into JSON spellings.
(explain-lines explanation value)(explain-lines explanation value prefix)The sorted, distinct fault lines of explanation for value (JSON data). A failed
oneOf gives the faults of the one branch whose discriminator const holds. Without
one such branch, it is one line and the faults of its branches are left out. A line never holds a
value that a person wrote, only names and limits of the schema. prefix goes in front of
each path, for a value that is a part of a larger one.
The sorted, distinct fault lines of `explanation` for `value` (JSON data). A failed `oneOf` gives the faults of the one branch whose discriminator `const` holds. Without one such branch, it is one line and the faults of its branches are left out. A line never holds a value that a person wrote, only names and limits of the schema. `prefix` goes in front of each path, for a value that is a part of a larger one.
(explain-text explanation)(explain-text explanation value)The fault lines of explanation for value, joined, or nil when it has none.
The fault lines of `explanation` for `value`, joined, or nil when it has none.
(joined-lines lines)At most most_shown of lines, joined with ;, then and N more.
At most `most_shown` of `lines`, joined with `; `, then `and N more`.
(json-type v)The JSON type name of a decoded value.
The JSON type name of a decoded value.
(message-table)The message table of common.json.
The message table of `common.json`.
(named-line path rule-name)(named-line path rule-name values)The line of hand rule rule-name of the message table at path.
The line of hand rule `rule-name` of the message table at `path`.
(number-text n)A schema number as text: an integral number without a fraction.
A schema number as text: an integral number without a fraction.
(ref-document ref)The schema document that $ref value ref names, or nil for a local or foreign ref.
A ref names a document by its file name or by its full $id.
The schema document that `$ref` value `ref` names, or nil for a local or foreign ref. A ref names a document by its file name or by its full `$id`.
(render template values)Template template with each {name} replaced by (get values name).
Template `template` with each `{name}` replaced by `(get values name)`.
(rule-line path message rule)One fault line {path} - {message} ({rule}) of the message table.
One fault line `{path} - {message} ({rule})` of the message table.
(rule-text rule-name values)The message of hand rule rule-name of the message table, without a path: the
reason of a patch refusal that names its node itself.
The message of hand rule `rule-name` of the message table, without a path: the reason of a patch refusal that names its node itself.
(schema-document document-name)The parsed canonical JSON Schema named document-name, cached after its first read.
The parsed canonical JSON Schema named `document-name`, cached after its first read.
(valid-json? document-name definition value)True when raw JSON-shaped data satisfies a named definition.
True when raw JSON-shaped data satisfies a named definition.
(valid? document-name value)(valid? document-name definition value)True when value satisfies the document root or named JSON Schema definition.
True when `value` satisfies the document root or named JSON Schema definition.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |