Skip to main content

Module validate

Module validate 

Source
Expand description

Check a JSON value against a generated schema.

The engine is behind this module: nothing outside it sees how a schema is held, only Violations. Generated schemas keep to params::KEYWORDS, the engine checks those keywords alone, and Keyword has a variant for each that can reject a value.

Structs§

ParamsCheck
The compiled schema of one action’s with: block.
Pointer
A JSON pointer (RFC 6901), held as its segments.
SchemaError
A schema the engine could not compile, which is a mistake in the generator rather than in a ceremony.
Validator
A compiled schema.
Violation
One way a value fails a schema.

Enums§

Anchor
Where a diagnostic about a violation points: at a key, or at a value.
Keyword
A keyword that rejected a value, and what it asked for.
Matched
How many of a oneOf’s alternatives a value matched, when it was not exactly one.
Values
Whether a message may quote the value it is about.

Functions§

params_check
The check for action, compiled on first use and kept for the process.