Expand description
Strict Draft 2020-12 schema documents, validation, and resolved schema IR.
The main entry point is SchemaDocument. Build one from raw JSON with
SchemaDocument::from_json, validate instances with SchemaDocument::is_valid,
and use compile only when you need direct access to the underlying
validator backend. Crates that implement analysis or generation can inspect
the lazily resolved canonical IR with SchemaDocument::root.
Structs§
- Contains
Constraint - Array
containsconstraints are stored as a single structured value so the count bounds cannot drift out of sync with the subschema itself. - Count
Range - Inclusive count range with optional upper bound.
- Integer
Bounds - A canonical closed interval over signed 64-bit integers.
- Integer
Multiple Of - Positive
multipleOfconstraint stored on integer schemas. - JSON
Schema - A compiled JSON Schema validator.
- NodeId
- Stable identity for one in-memory schema node within the lifetime of the AST.
- Number
Bounds - A validated floating-point interval with finite endpoints.
- Number
Multiple Of - Positive
multipleOfconstraint stored on number schemas. - Pattern
Constraint - A pattern constraint with cached matcher state and its original source text.
- Pattern
Property - One
patternPropertiesentry with both the source pattern and compiled matcher. - Schema
Document - Fully resolved JSON Schema document.
- Schema
Node - Shared immutable representation of a resolved JSON Schema node.
Enums§
- AstError
- Compile
Error - Number
Bound - One finite lower/upper bound for a floating-point interval.
- Pattern
Support - Whether a regex pattern can be executed by the internal Rust matcher.
- Schema
Error - Schema
Node Kind - A resolved, executable JSON Schema node.
Functions§
- compile
- Compile a JSON Schema document directly with the validator backend.
- json_
values_ equal - Return true when two JSON values are equal under JSON Schema semantics.
Type Aliases§
- Schema
Build Error - Public schema-build error name used by
SchemaDocument::from_json.