referencing
An implementation-agnostic JSON reference resolution library for Rust.
0.50.1
35M downloads/mo
#1542 most downloaded on crates.io
Stranger6667/jsonschema
What this package is like to depend on
Last release today
22 Aug 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 81 of 81 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
81 releases · first in 2024
53 releases in the last 12 months
see the full history below
Release timeline
81 releases · Sep 2024 to Aug 2026Releases
latest 60 of 81-
0.50.122 Aug 2026Release notes
Open source →Added
str()onContainment,Satisfiability,DistinctnessandCanonicalKindmembers reads as the label.
Changed
CanonicalSchema.satisfiability()answersYESfor a string whosepatternorformata matching value can be built from.CanonicalSchema.satisfiability()answersNOwhere aformattakes no string of the length the schema asks for.
Fixed
CanonicalSchema.negate()taking apart a union that reads a definition through its ownif, so a schema and its negation shared a value.CanonicalSchema.subtract()dropping a Draft 4 array member an element demand partly takes.CanonicalSchema.covers()answeringYeswhere a Draft 4 element demand refuses a member.- A string schema whose
maxLengthis0keeping apattern,format, or content facet unread, so the same constraints written in one object and written as anallOfreached different canonical forms.
Performance
notover a wide object schema costs its branch count instead of its square.notover an object schema is linear in its property count, not quadratic.notover an object schema withadditionalProperties: falseno longer costs cubic time in its property count.
Release notes
Open source →Changed
CanonicalSchema::satisfiabilityanswersYesfor a string whosepatternorformata matching value can be built from.CanonicalSchema::satisfiabilityanswersNowhere aformattakes no string of the length the schema asks for.
Fixed
CanonicalSchema::negatetaking apart a union that reads a definition through its ownif, so a schema and its negation shared a value.CanonicalSchema::subtractdropping a Draft 4 array member an element demand partly takes.CanonicalSchema::coversansweringYeswhere a Draft 4 element demand refuses a member.- A string schema whose
maxLengthis0keeping apattern,format, or content facet unread, so the same constraints written in one object and written as anallOfreached different canonical forms.
Performance
notover a wide object schema costs its branch count instead of its square.notover an object schema is linear in its property count, not quadratic.notover an object schema withadditionalProperties: falseno longer costs cubic time in its property count.
Release notes
Open source →Changed
CanonicalSchema#satisfiabilityanswers:yesfor a string whosepatternorformata matching value can be built from.CanonicalSchema#satisfiabilityanswers:nowhere aformattakes no string of the length the schema asks for.
Fixed
CanonicalSchema#negatetaking apart a union that reads a definition through its ownif, so a schema and its negation shared a value.CanonicalSchema#subtractdropping a Draft 4 array member an element demand partly takes.CanonicalSchema#coversansweringYeswhere a Draft 4 element demand refuses a member.- A string schema whose
maxLengthis0keeping apattern,format, or content facet unread, so the same constraints written in one object and written as anallOfreached different canonical forms.
Performance
notover a wide object schema costs its branch count instead of its square.notover an object schema is linear in its property count, not quadratic.notover an object schema withadditionalProperties: falseno longer costs cubic time in its property count.
Release notes
Open source →Changed
CanonicalSchema::satisfiabilityanswersYesfor a string whosepatternorformata matching value can be built from.CanonicalSchema::satisfiabilityanswersNowhere aformattakes no string of the length the schema asks for.
Fixed
CanonicalSchema::negatetaking apart a union that reads a definition through its ownif, so a schema and its negation shared a value.CanonicalSchema::subtractdropping a Draft 4 array member an element demand partly takes.CanonicalSchema::coversansweringYeswhere a Draft 4 element demand refuses a member.- A string schema whose
maxLengthis0keeping apattern,format, or content facet unread, so the same constraints written in one object and written as anallOfreached different canonical forms.
Performance
notover a wide object schema costs its branch count instead of its square.notover an object schema is linear in its property count, not quadratic.notover an object schema withadditionalProperties: falseno longer costs cubic time in its property count.
-
0.50.020 Aug 2026Release notes
Open source →Added
CanonicalSchema.unionandCanonicalSchema.subtract.canonical.UnsupportedResult, raised where the canonical form does not support a set operation's result.canonical.IncompatibleOperandswhere both operands read#and it names a different document on each side.canonical.Containment,canonical.Satisfiability,canonical.Distinctnessandcanonical.CanonicalKind: the possible answers ofcovers(),satisfiability(),kindandArrayView.distinctness.
Changed
CanonicalSchema.is_satisfiable()is nowCanonicalSchema.satisfiability(), answering with thecanonical.SatisfiabilitymembersYES,NOorUNKNOWN-YESwherever a value can be exhibited, not only for the forms listing their members.CanonicalSchema.covers()decides through the difference as well:NOwhere the argument keeps values the receiver rejects,YESwhere nothing is left over.CanonicalSchema.is_subset_of()is nowCanonicalSchema.covers(), answering with thecanonical.ContainmentmembersYES,NOorUNKNOWNfor whether the receiver admits every value the argument admits.CanonicalSchema.kindandArrayView.distinctnessanswer with thecanonical.CanonicalKindandcanonical.Distinctnessmembers instead of strings.CanonicalSchema.negate()raises where it used to returnNone.canonical.UnmodeledOperandis nowcanonical.UnsupportedOperand, and means only that an operand is aRawpass-through.
Fixed
- Combining nodes of two different documents repointing a
$refto#at the combined result instead of the document it was written in, including one named by a definition the result keeps. - Intersecting a
$refwhose target istrueorfalse, which crashed the interpreter. - A key constraint left un-narrowed once a run is out of intersections, which crashed the interpreter on the next read of it.
CanonicalSchema.covers()answeringUNKNOWNfor a schema against itself, where that schema is a$ref.CanonicalSchema.union()keeping a$refbeside the schema it names, where the other three operations read through it.CanonicalSchema.covers()andCanonicalSchema.subtract()cancelling two nodes written the same way whose#names a different document.- Two results accepting the same values comparing unequal over the part of their documents neither reads.
additionalPropertiesreaching a key the pattern map matches when a finite key constraint closes the map, which dropped values both operands accept.- A recursive definition stopping every other pointer in the document from being read through.
- One
$defsentry read past a wider schema written out at every use, rather than kept as the pointer it was. - Set operations rejecting one document canonicalized twice, and a pruned result rejected against the document it came from, where the maps resolve every shared reference the same way.
- Set operations comparing a
$refas a pointer instead of reading through it, so a schema written with a$refdid not cancel against the same schema written out. CanonicalSchema.subtract()asking for a complement where the difference is one of the operands or empty, declining on schemas it can subtract.- Set operations keeping
$defsentries the result no longer references, which then showed up in the emitted schema. CanonicalSchema.union()declining over an approximated intersection, where the union itself is exact.
Release notes
Open source →Added
CanonicalSchema::unionandCanonicalSchema::subtract.CanonicalizationError::UnsupportedResult, reported where the canonical form does not support a set operation's result.OperandMismatch::DocumentRoots, reported where both operands read#and it names a different document on each side.- CLI:
jsonschema validate -i INSTANCEwithout aSCHEMAargument validates each instance against the schema named in its own$schemaproperty. #1470
Changed
CanonicalSchema::is_satisfiableis nowCanonicalSchema::satisfiability, answeringYes,No, orUnknown-Yeswherever a value can be exhibited, not only for the forms listing their members.CanonicalSchema::coversdecides through the difference as well:Nowhere the argument keeps values the receiver rejects,Yeswhere nothing is left over.CanonicalSchema::is_subset_ofis nowCanonicalSchema::covers, answeringYes,No, orUnknownfor whether the receiver admits every value the argument admits.CanonicalSchema::negatereturnsResultrather thanOption.CanonicalizationError::UnmodeledOperandis nowCanonicalizationError::UnsupportedOperand, and means only that an operand is aRawpass-through.- A conjunction over a
$reffolds through the body it names, so canonicalizing a document and combining its parts with the set operations reach one form; a document holding a reference cycle keeps the form it had.
Fixed
- Combining nodes of two different documents repointing a
$refto#at the combined result instead of the document it was written in, including one named by a definition the result keeps. - Intersecting a
$refwhose target istrueorfalse, which panicked. - A key constraint left un-narrowed once a run is out of intersections, which panicked on the next read of it.
CanonicalSchema::coversansweringUnknownfor a schema against itself, where that schema is a$ref.CanonicalSchema::unionkeeping a$refbeside the schema it names, where the other three operations read through it.CanonicalSchema::coversandCanonicalSchema::subtractcancelling two nodes written the same way whose#names a different document.- Two results accepting the same values comparing unequal over the part of their documents neither reads.
additionalPropertiesreaching a key the pattern map matches when a finite key constraint closes the map, which dropped values both operands accept.- A recursive definition stopping every other pointer in the document from being read through.
- One
$defsentry read past a wider schema written out at every use, rather than kept as the pointer it was. - Set operations rejecting one document canonicalized twice, and a pruned result rejected against the document it came from, where the maps resolve every shared reference the same way.
- Set operations comparing a
$refas a pointer instead of reading through it, so a schema written with a$refdid not cancel against the same schema written out. CanonicalSchema::subtractasking for a complement where the difference is one of the operands or empty, declining on schemas it can subtract.- Set operations keeping
$defsentries the result no longer references, which then showed up in the emitted schema. CanonicalSchema::uniondeclining over an approximated intersection, where the union itself is exact.- Resolving a reference against a base URI that carries a fragment, which happens when a Draft 4-7
$idcontains one. #1473 unevaluatedPropertiesandunevaluatedItemsignoring an$idon a subschema they walk through, so a relative$refinside it resolved against the enclosing resource.
Performance
- CLI: ~25% less CPU per run from compile-time meta-schema validators.
Release notes
Open source →CanonicalSchema#unionandCanonicalSchema#subtract.JSONSchema::Canonical::UnsupportedResult, raised where the canonical form does not support a set operation's result.JSONSchema::Canonical::IncompatibleOperandswhere both operands read#and it names a different document on each side.JSONSchema::Canonical::Containment,Satisfiability,DistinctnessandKind: named constants for the symbolscovers,satisfiability,kindandArrayView#distinctnessreturn, each with anALLlist.
Changed
CanonicalSchema#satisfiable?is nowCanonicalSchema#satisfiability, answering:yes,:no, or:unknown-:yeswherever a value can be exhibited, not only for the forms listing their members.CanonicalSchema#coversdecides through the difference as well::nowhere the argument keeps values the receiver rejects,:yeswhere nothing is left over.CanonicalSchema#is_subset_ofis nowCanonicalSchema#covers, answering:yes,:no, or:unknownfor whether the receiver admits every value the argument admits.CanonicalSchema#negateraises where it used to returnnil.JSONSchema::Canonical::UnmodeledOperandis nowJSONSchema::Canonical::UnsupportedOperand, and means only that an operand is aRawpass-through.
Fixed
- Combining nodes of two different documents repointing a
$refto#at the combined result instead of the document it was written in, including one named by a definition the result keeps. - Intersecting a
$refwhose target istrueorfalse, which crashed the interpreter. - A key constraint left un-narrowed once a run is out of intersections, which crashed the interpreter on the next read of it.
CanonicalSchema#coversanswering:unknownfor a schema against itself, where that schema is a$ref.CanonicalSchema#unionkeeping a$refbeside the schema it names, where the other three operations read through it.CanonicalSchema#coversandCanonicalSchema#subtractcancelling two nodes written the same way whose#names a different document.- Two results accepting the same values comparing unequal over the part of their documents neither reads.
additionalPropertiesreaching a key the pattern map matches when a finite key constraint closes the map, which dropped values both operands accept.- A recursive definition stopping every other pointer in the document from being read through.
- One
$defsentry read past a wider schema written out at every use, rather than kept as the pointer it was. - Set operations rejecting one document canonicalized twice, and a pruned result rejected against the document it came from, where the maps resolve every shared reference the same way.
- Set operations comparing a
$refas a pointer instead of reading through it, so a schema written with a$refdid not cancel against the same schema written out. CanonicalSchema#subtractasking for a complement where the difference is one of the operands or empty, declining on schemas it can subtract.- Set operations keeping
$defsentries the result no longer references, which then showed up in the emitted schema. CanonicalSchema#uniondeclining over an approximated intersection, where the union itself is exact.
Release notes
Open source →Added
CanonicalSchema::unionandCanonicalSchema::subtract.CanonicalizationError::UnsupportedResult, reported where the canonical form does not support a set operation's result.OperandMismatch::DocumentRoots, reported where both operands read#and it names a different document on each side.- CLI:
jsonschema validate -i INSTANCEwithout aSCHEMAargument validates each instance against the schema named in its own$schemaproperty. #1470
Changed
CanonicalSchema::is_satisfiableis nowCanonicalSchema::satisfiability, answeringYes,No, orUnknown-Yeswherever a value can be exhibited, not only for the forms listing their members.CanonicalSchema::coversdecides through the difference as well:Nowhere the argument keeps values the receiver rejects,Yeswhere nothing is left over.CanonicalSchema::is_subset_ofis nowCanonicalSchema::covers, answeringYes,No, orUnknownfor whether the receiver admits every value the argument admits.CanonicalSchema::negatereturnsResultrather thanOption.CanonicalizationError::UnmodeledOperandis nowCanonicalizationError::UnsupportedOperand, and means only that an operand is aRawpass-through.- A conjunction over a
$reffolds through the body it names, so canonicalizing a document and combining its parts with the set operations reach one form; a document holding a reference cycle keeps the form it had.
Fixed
- Combining nodes of two different documents repointing a
$refto#at the combined result instead of the document it was written in, including one named by a definition the result keeps. - Intersecting a
$refwhose target istrueorfalse, which panicked. - A key constraint left un-narrowed once a run is out of intersections, which panicked on the next read of it.
CanonicalSchema::coversansweringUnknownfor a schema against itself, where that schema is a$ref.CanonicalSchema::unionkeeping a$refbeside the schema it names, where the other three operations read through it.CanonicalSchema::coversandCanonicalSchema::subtractcancelling two nodes written the same way whose#names a different document.- Two results accepting the same values comparing unequal over the part of their documents neither reads.
additionalPropertiesreaching a key the pattern map matches when a finite key constraint closes the map, which dropped values both operands accept.- A recursive definition stopping every other pointer in the document from being read through.
- One
$defsentry read past a wider schema written out at every use, rather than kept as the pointer it was. - Set operations rejecting one document canonicalized twice, and a pruned result rejected against the document it came from, where the maps resolve every shared reference the same way.
- Set operations comparing a
$refas a pointer instead of reading through it, so a schema written with a$refdid not cancel against the same schema written out. CanonicalSchema::subtractasking for a complement where the difference is one of the operands or empty, declining on schemas it can subtract.- Set operations keeping
$defsentries the result no longer references, which then showed up in the emitted schema. CanonicalSchema::uniondeclining over an approximated intersection, where the union itself is exact.- Resolving a reference against a base URI that carries a fragment, which happens when a Draft 4-7
$idcontains one. #1473 unevaluatedPropertiesandunevaluatedItemsignoring an$idon a subschema they walk through, so a relative$refinside it resolved against the enclosing resource.
Performance
- CLI: ~25% less CPU per run from compile-time meta-schema validators.
-
0.49.909 Aug 2026Release notes
Open source →Added
- Canonicalization of a
oneOfwhose branches name object targets a required constant tells apart, which degrades to a union.
Changed
CanonicalSchema::to_json_schemaon a definition emits only the definitions that one names, not the whole document's.
Fixed
- Canonicalization running without end on a conjunction over unions; past a ceiling on the meets it takes, the document stays unmodeled.
Release notes
Open source →Added
- Canonicalization of a
oneOfwhose branches name object targets a required constant tells apart, which degrades to a union.
Changed
CanonicalSchema::to_json_schemaon a definition emits only the definitions that one names, not the whole document's.
Fixed
- Canonicalization running without end on a conjunction over unions; past a ceiling on the meets it takes, the document stays unmodeled.
- Canonicalization of a
-
0.49.808 Aug 2026Release notes
Open source →Performance
- Up to 380x faster canonicalization of a
oneOfwhose overlapping branches carry many properties, which no longer removes shared regions the exactly-one spelling discards.
Fixed
- Draft detection treating the version-less
http://json-schema.org/schemameta-schema URI as a custom dialect, where it names the current draft. - A
patternPropertiesentry matching every key leavingadditionalProperties: falsespelled as a key constraint, where it forbids nothing. unevaluatedProperties/unevaluatedItemsset totrueforcing the whole document to stay unmodeled beside an unresolved applicator, where the keyword rejects nothing regardless of the evaluated set.unevaluatedProperties/unevaluatedItemsbeside a$refforcing the whole document to stay unmodeled, where the reference's own evaluated properties or items are known once it is resolved.
- Up to 380x faster canonicalization of a
-
0.49.707 Aug 2026Release notes
Open source →Added
CanonicalizeOptions::with_retrieverto fetch external resources absent from the registry.CanonicalizeOptions::with_base_urito resolve relative references in the root schema.- Canonicalization of a
oneOfwhose branches name disjoint targets, which degrades to a union. - Canonicalization of a vacuous
patternPropertiesentry beside schema-valuedadditionalProperties, where matching keys escape its value constraint. - Canonicalization of a Draft 4 closed pattern map with a reference nested under a property.
- Canonicalization of Draft 4 closed pattern maps that meet through an applicator.
- The complement of a reference back to a target already being negated, which stays symbolic instead of declining.
CanonicalSchema::definitionresolving#to the document the handle was read against.
Performance
- Up to 150x faster canonicalization of
notover a union of many branches. - 2% faster emission of canonical schemas, which no longer formats copied string values.
- 5% faster emission of canonical schemas, which no longer formats object keys while copying them.
- Up to 12% faster canonicalization of schemas that repeatedly intersect the same branches.
- 13% faster canonicalization of a non-dynamic OpenAPI document, which no longer scans every schema object for dynamic references.
- Faster canonicalization of schemas with local
$defsreferences, which avoid decoding unescaped definition names. - 23% faster canonicalization of an object whose keys a finite property-name set spells.
- 3% faster intersection of schemas where one side constrains nothing.
- Up to 31x faster canonicalization of a
oneOfwhose many branches overlap. - Up to 14x faster canonicalization of a union whose object branches share no values.
- 7% faster canonicalization of schemas that reach the same pair of nodes repeatedly.
- 5% faster canonicalization of objects, whose property maps no longer reach the allocator.
- Up to 8% faster canonicalization of schemas that reach
trueandfalsesubschemas repeatedly. - 2% faster canonicalization of schemas that assert known string formats.
Fixed
CanonicalSchema::definitionandCanonicalSchema::definitionshanding out a target that names the document root without that document, where#points at the target instead.- An
itemstail beyond an array's length ceiling surviving canonicalization, where it governs no element. CanonicalSchema::to_json_schemaleaving the document root out of a node emitted below it, where#points at that node instead.
-
0.49.606 Aug 2026Release notes
Open source →Added
- Canonicalization of a negated
uniqueItems, where the complement demands a repeated element under the length floor two elements imply. - Canonicalization of a negated array tuple, where each position's complement stands under the length that reaches it.
- Canonicalization of
containsdemands sharing no value, where their counts add up into a length floor. CanonicalSchema::negatethrough references, where the complement of the resolved target takes the reference's place.- Canonicalization of negated
propertyNamesandadditionalProperties, where the complement spells the violating-key demand instead of anotresidual. - Canonicalization of negated
additionalPropertiesunder Draft 4, where the violating-key demand spells the closed property map. - Canonicalization of
nota reference, where the complement of the resolved target takes the pointer's place. - Canonicalization of a negated
oneOf, where the complement spells the values no branch admits beside the values two branches share. - Canonicalization of negated
itemsunder Draft 4, where the violating-element demand spells the barred element schema.
Changed
ArrayViewreports distinctness in three states, so an array demanding a repeated element reads apart from one demanding distinct elements.
Fixed
CanonicalSchema::negatekeeping a root self-reference in the complement, where it points at the complement instead of the source.- An
additionalItemsthat tails no tuple keeping the whole document unmodeled under Draft 2020-12.
- Canonicalization of a negated
-
0.49.504 Aug 2026Release notes
Open source →Added
- Canonicalization of
notan integer schema under Draft 4, which the number leaf carries as barred integers. - Canonicalization of
notamultipleOf, which numeric leaves carry as barred divisors. - Canonicalization of
notan integer schema, where a barred divisor of one spells the non-integer numbers. - Canonicalization of
notapattern, which string leaves carry as barred patterns. - Canonicalization of
nota typed value set under Draft 4, such as{"type": "integer", "enum": [1, 2]}. CanonicalSchema::is_subset_of, whether the other schema admits every value this one admits.- Canonicalization of a reference cycle carrying no assertion, which admits every value.
Fixed
CanonicalSchema::is_subset_offailing to prove a union of array branches a subset of itself.CanonicalSchema::intersectadmitting values one side rejects when itsadditionalPropertiesgoverns the keys the other side'spatternPropertiesmatch.- A satisfiable
multipleOfschema collapsing to the empty set whenf64rounds its bounds together. - Two spellings of one number canonicalizing to different texts under
arbitrary-precisionwhen the fraction exceeds the expansion cap. - Numeric bounds and
multipleOfcomparing values through a lossyf64conversion underarbitrary-precision, such as1e-400passing{"maximum": 0}. - A union branch left unabsorbed when a sibling complement shed a conjunct from another branch.
- A union keeping an integer branch beside a number branch that admits every value of it.
- Canonicalization of
-
0.49.403 Aug 2026Release notes
Open source →Added
- Canonicalization of
nota string format, which the string leaf carries as barred formats. - Canonicalization of
notan existential demand, which an array fails exactly when no element matches. - Canonicalization of
nota string value set, which the string leaf carries as excluded values. - Canonicalization of
unevaluatedItemsbesidecontains, where the elements it matches are evaluated and the tail admits either. - Canonicalization of
unevaluated*besideanyOforoneOf, where every branch evaluating the same keys or indexes pins what is left over. - Canonicalization of
notan array element schema, which an array fails exactly when one element violates it. CanonicalSchema::intersect, the values both schemas admit.CanonicalSchema::negate, the values a schema rejects.CanonicalSchema::definition, one reference target by URI.
Fixed
- An integer past
i64admitted by a fractional boundf64rounds it onto, such as-10000000000000000000000000under{"maximum": -10000000000000000000000000.1}. - An integer past
2^53admitted by a boundf64rounds onto it, such as9007199254740992under{"minimum": 9007199254740993}. - A
containssubschema beside bothminContainsandmaxContainsoverwriting a sibling keyword of the same name, such asitems.
Performance
CanonicalSchemahashing and equality cost the node instead of the whole document.
- Canonicalization of
-
0.49.302 Aug 2026Release notes
Open source →Added
- Canonicalization of a recursive schema with no finite witness, which now folds to
false. - Canonicalization of
$dynamicRefand$recursiveRef, which resolve through the dynamic scope and stay symbolic like any other reference. A dangling$dynamicReferrors rather than stayingRaw. - Canonicalization of
minContainsunderuniqueItems, where a demand asking for more matches than its own schema has distinct values now folds tofalse. - Canonicalization of a Draft 4
patternPropertiescoverage closed byadditionalProperties: false, spelled as the closed map it was parsed from. - Canonicalization of a
oneOfwhose branches repeat, where a repeated branch can never contribute exactly one match. - Canonicalization of a
$refwhose target is an empty schema, which now folds tofalse. - Canonicalization of
unevaluatedItemsbesideallOf, where every branch must pass and so the indexes they evaluate are known without the instance. - Canonicalization of
unevaluatedPropertiesbesideallOf, where every branch must pass and so what they evaluate is known without the instance. - Canonicalization of a Draft 4
typelist holdingintegerbeside other types withenum, which previously modeled only when spelled as anallOf. - Canonicalization of
patternPropertiespatterns matching finitely many keys, such as^a$and^(a|b)$. - Canonicalization of
unevaluatedPropertiesandunevaluatedItemswhen no in-place applicator sits beside them.
Fixed
additionalItemsvalues that are not schemas silently ignored beside an array-formitems(they should fail the build likeadditionalProperties).additionalItemsbeside a booleanitemsrejecting every instance, such as{"additionalItems": false, "items": false}.additionalItemsbeside a non-arrayitemsvalue failing schema compilation with an error blamingadditionalItems(the keyword should be ignored).- Draft 4 rejecting a size bound at or past
2^64, such as{"maxItems": 18446744073709551616}. - An integer past the
f64range admitted by a fractional bound it exceeds, such as1e400under{"exclusiveMaximum": 0.1}. - A
$refat the root of an$id-bearing subresource dropped as a self-reference when its pointer matched the one that reached that subresource. - Canonicalization reusing one definition's body for a same-named definition in another resource, when the name spells a canonical URI.
unevaluatedItemscountingprefixItemsas evaluating elements before Draft 2020-12, where it is not a keyword.
Performance
- Up to 70% faster
evaluateby building each location in a single allocation instead of two, reusing the instance location a node already built, and caching evaluation paths across instance nodes.
- Canonicalization of a recursive schema with no finite witness, which now folds to
-
0.49.227 Jul 2026Release notes
Open source →Performance
- Faster serialization of canonicalized schemas.
- Faster macro code generation for subschemas with many keywords.
- Up to 70x faster canonicalization of
multipleOfbeside numeric bounds far from zero.
-
0.49.125 Jul 2026 -
0.49.025 Jul 2026Release notes
Open source →Added
- Generic JSON input:
options_forbuilds a validator over any instance representation implementingjson::Json, so instances validate without conversion toserde_json::Value. #239 meta::validate_forandmeta::is_valid_forfor checking a schema document held in any representation implementingjson::Jsonagainst its meta-schema.- EXPERIMENTAL: Schema canonicalization via
jsonschema::canonicalize. It reduces a reasonable subset of JSON Schemas to their normal forms.
Fixed
multipleOfincorrectly accepted integers pastu64that are not multiples of the divisor.
- Generic JSON input:
-
0.48.522 Jul 2026 -
0.48.422 Jul 2026 -
0.48.322 Jul 2026Release notes
Open source →Changed
- INTERNAL. Extract common JSON Schema semantic into a separate
jsonschema-valuecrate.
Performance
- Avoid map lookups in some
propertiesvalidators. - Faster validation of
{"type": "array", "items": {...}}schemas.
- INTERNAL. Extract common JSON Schema semantic into a separate
-
0.48.220 Jul 2026 -
0.48.117 Jul 2026Release notes
Open source →Fixed
- Missing
requirederrors inevaluate()output for schemas withpropertiesand a two-entryrequiredarray. #1220 contentEncodingerrors for invalid UTF-8 after decoding incorrectly had emptyinstance_pathandschema_path.
Performance
- Faster code generation for
#[jsonschema::validator](~5% across benchmarked schemas), via aliasing repeated paths in the emitted code.
- Missing
-
0.48.016 Jul 2026Release notes
Open source →Added
iter_errorsfor#[jsonschema::validator]-generated validators.
Fixed
- Per-branch context on generated
anyOfandoneOfvalidation errors, matching runtime validators. $recursiveRefin generated validators incorrectly resolved to the innermost$recursiveAnchor(it should resolve to the outermost one).- Integer instances just outside the
i64/u64range incorrectly compared against numeric bounds through lossyf64rounding underarbitrary-precision(e.g.{"minimum": -9223372036854775808}accepted-9223372036854775809).
Changed
- One canonical number spelling from
canonical::json::to_stringunderarbitrary-precision("1e-2"becomes"0.01","1.50"becomes"1.5") and correctly-rounded float parsing (serde_json'sfloat_roundtrip).
Performance
- Faster
multipleOfvalidation for integer instances with integer divisors, via integer arithmetic instead of floating-point modulo.
-
0.47.007 Jul 2026Release notes
Open source →Added
#[jsonschema::validator]attribute macro (behind themacrosfeature) that compiles a JSON Schema intois_validandvalidateimplementations at build time.Keyword::iter_errorsfor reporting multiple validation errors from a single custom keyword. #1071
Changed
- Bump MSRV to
1.85.0.
Performance
- Faster meta-schema validation and schema compilation with the
macrosfeature, via compile-time meta-schema validators.
Fixed
typeunderitemsasserted with the Validation vocabulary disabled.- Disabled vocabularies ignored for
$reftargets without their own$schema(e.g.$defsentries).
-
0.46.1005 Jul 2026Release notes
Open source →Fixed
- Stack overflow with a self-referential
$dynamicRefcombined withunevaluatedPropertiesorunevaluatedItems. - Incorrect
unevaluatedPropertiesandunevaluatedItemsresults when a meta-schema disables the Applicator vocabulary.
- Stack overflow with a self-referential
-
0.46.902 Jul 2026Release notes
Open source →Fixed
multipleOfincorrectly rounds integer instances above 2^53 tof64before the divisibility check on builds without thearbitrary-precisionfeature.- Stack overflow while preparing a registry containing deeply nested schema documents.
-
0.46.801 Jul 2026Release notes
Open source →Fixed
idn-emailformat rejected non-ASCII characters in quoted local parts (e.g."δοκιμή"@example.com).
-
0.46.730 Jun 2026Release notes
Open source →Fixed
idn-hostnameformat accepted A-labels that decode to a disallowed code point (e.g.xn--7a).
-
0.46.623 Jun 2026Release notes
Open source →Added
IntoRegistryResourceforArc<Value>. #1129
Fixed
prefixItemsincorrectly recognised as a known keyword in Draft 2019-09 and earlier (it is 2020-12 only).patternvalidation errors displayed the internally translated regex instead of the original schema pattern. #1149
-
0.46.513 May 2026Release notes
Open source →Fixed
- Percent-encoded characters in
$refURI fragments (e.g.#/$defs/Request%20class) are now decoded when stored asschema_path.
- Percent-encoded characters in
-
0.46.401 May 2026Release notes
Open source →Fixed
- Panic in the regex engine when matching against patterns with very large
{0,N}quantifiers.
- Panic in the regex engine when matching against patterns with very large
-
0.46.328 Apr 2026Release notes
Open source →Fixed
- Memory not reclaimed when a
Validatorfor a schema with recursive$refor$dynamicRefis dropped. #1125 - Compilation failure on
wasm32-wasip1andwasm32-unknown-emscriptentargets.
- Memory not reclaimed when a
-
0.46.220 Apr 2026Release notes
Open source →Fixed
requirednot enforced whenadditionalPropertiesis a schema object andrequiredlists exactly 2 keys.
-
0.46.118 Apr 2026Release notes
Open source →Fixed
requirednot enforced whenpropertieshas 15 or more entries andrequiredlists exactly 2 keys.
-
0.46.010 Apr 2026Release notes
Open source →Added
ValidatorMapfor validating instances against subschemas identified by URI-fragment JSON pointer. #1075- CLI: Accept multiple values after
-i/--instance(e.g.jsonschema validate schema.json -i *.json). #1085 dereferencefunction to recursively inline$refreferences. #422- CLI:
jsonschema dereferencesubcommand to dereference a schema from the command line.
Breaking Changes
- Registry construction now uses an explicit prepare step, and
with_registrynow borrows the prepared registry.ValidationOptions::with_resourceandValidationOptions::with_resourceswere removed in favor of building aRegistryfirst. See the Migration Guide for the details.
Performance
- Avoid registry clones and document clones during validator construction. This improves real-world schema compilation by roughly 10-20% in internal benchmarks.
-
0.45.106 Apr 2026Release notes
Open source →Fixed
- Incorrect handling of
multipleOfvalidation for negative numeric instances. - Incorrect handling of
durationformat when hours and seconds appear without minutes, or years and days without months.
- Incorrect handling of
-
0.45.008 Mar 2026Release notes
Open source →Added
bundle(schema)/async_bundle(schema)/ValidationOptions::bundle: produce a Compound Schema Document with external$reftargets embedded in a draft-appropriate container (definitionsfor Draft 4/6/7,$defsfor Draft 2019-09/2020-12) while preserving$refvalues. #791.- CLI:
jsonschema validateandjsonschema bundlesubcommands. Flat invocation (jsonschema schema.json -i …) is deprecated — usejsonschema validateinstead. #791. ValidationError::absolute_keyword_location()to get the absolute keyword location URI of the schema node that produced the error. #737.
Changed
ValidationError::into_parts()now returnsValidationErrorPartsinstead of a tuple.
-
0.44.103 Mar 2026Release notes
Open source →Fixed
hostnameformat now applies legacy RFC 1034 semantics in Draft 4/6 and keeps IDNA A-label validation in Draft 7+.
-
0.44.001 Mar 2026Release notes
Open source →Added
canonical::json::to_string(value)for canonical JSON serialization (stable key ordering and numeric normalization), useful for deduplicating equivalent JSON Schemas.
Fixed
- Do not produce annotations for non-string instances from
contentMediaType,contentEncoding, andcontentSchemakeywords.
-
0.43.028 Feb 2026Release notes
Open source →Performance
- Optimize
patternandpatternPropertiesfor^(a|b|c)$alternations via linear array scan. - Optimize
^\S*$patterns by replacing regex with a direct ECMA-262 whitespace check.
Fixed
anyOf,format,unevaluatedProperties, andunevaluatedItemsnow correctly collect annotations per spec.
- Optimize
-
0.42.226 Feb 2026Release notes
Open source →Fixed
- SWAR digit parser accepted bytes
:–?(0x3A–0x3F) as valid digits duringdate,time, anddate-timeformat validation, potentially allowing malformed values to pass.
Performance
- Extend
patternprefix optimization to handle escaped slashes (^\/) and exact-match patterns (^\$ref$). - Specialize
enumfor cases when all variants are strings.
- SWAR digit parser accepted bytes
-
0.42.117 Feb 2026Release notes
Open source →Performance
- Reduce dynamic dispatch overhead for non-recursive
$refresolution. - Cache ECMA regex transformations during
format: "regex"validation.
- Reduce dynamic dispatch overhead for non-recursive
-
0.42.014 Feb 2026Release notes
Open source →Added
JsonType::as_strmethod for zero-allocation type name access.ValidationErrorKind::keywordis now public.tls-ringfeature flag to opt into usingringas the TLS crypto provider instead of the defaultaws-lc-rs. #997- CLI: Support YAML (
.yaml/.yml) instance files in text output mode. #988
Changed
- BREAKING: Default TLS crypto provider switched back to
aws-lc-rs. Users who needringcan opt in via thetls-ringfeature flag. This resolves potential conflicts with other libraries usingaws-lc-rs. #997
Fixed
- Panic when validating
$reftargets that resolve to boolean schemas.
Performance
- Cache formatted schema locations with
OnceLockto avoid repeated formatting duringevaluate().
-
0.41.004 Feb 2026Release notes
Open source →Performance
- Replace regex-based
uri-templateformat validation with a hand-rolled RFC 6570 parser. - Specialize
itemskeyword for simple type schemas ({"type": "string"},{"type": "number"}, etc.) to eliminate dynamic dispatch overhead. - Precompute regex matches on known properties.
- Faster
unevaluatedPropertiesvalidation via O(1) property lookup and short-circuitoneOfevaluation. - Use HashMap for large set of properties.
- Lower HashMap threshold from 40 to 15 properties for faster property lookups.
- Replace regex-based
-
0.40.230 Jan 2026Release notes
Open source →Changed
- Exclude internal
trackerfield fromValidationErrorDebug output. - Switch HTTP client TLS crypto backend from
aws-lc-rstoringto simplify building from source on some Linux distributions. #957
Fixed
type: integervalidation in Draft 4 now correctly accepts large integers outside the i64/u64 range whenarbitrary-precisionfeature is enabled.
- Exclude internal
-
0.40.129 Jan 2026Release notes
Open source →Changed
ValidationErrorKind::Customnow includes akeywordfield containing the custom keyword name.
Performance
- Faster validation via cost-based keyword ordering.
- Faster
patternPropertiesfor simple prefix patterns (e.g.,^x-).
-
0.40.018 Jan 2026Release notes
Open source →Added
HttpOptionsandValidationOptions::with_http_options()for configuring HTTP client behavior (timeouts, TLS verification, custom CA certificates) when fetching external schemas.- CLI:
--timeout,--connect-timeout,--insecure, and--cacertflags for HTTP configuration.
-
0.39.016 Jan 2026Release notes
Open source →Added
ValidationError::evaluation_path()for the dynamic path including$reftraversals.
Changed
- BREAKING: Simplified custom keyword API -
Keyword::validateno longer receives path parameters, andValidationError::customonly takes a message.
Fixed
schemaLocationin evaluation output now excludes$ref/$dynamicRef/$recursiveRefper JSON Schema spec.
Performance
evaluate(): 4.5-30x faster on complex schemas, 12-89% faster overall.- Recursive schemas with
oneOf/anyOf: ~4000x faster via memoization. #930
-
0.38.124 Dec 2025Release notes
Open source →Fixed
multipleOfvalidation for integer values between2^53andi64::MAXwitharbitrary-precisionfeature.
-
0.38.024 Dec 2025 -
0.37.430 Nov 2025Release notes
Open source →Fixed
- Stack overflow during validation of schemas with circular
$refchains (e.g.,a->b->a). - Local
$refresolution within fragment-extracted external resources. #892
Removed
- Deprecated
PrimitiveType&PrimitiveTypesBitMap.
- Stack overflow during validation of schemas with circular
-
0.37.328 Nov 2025Release notes
Open source →Fixed
- External resources not discovered within subresources of local
$reftargets. #892
- External resources not discovered within subresources of local
-
0.37.227 Nov 2025Release notes
Open source →Added
JsonTypeSet::len()andJsonTypeSet::remove()helpers for managing type sets.
Fixed
- External resources not discovered through chained local
$refreferences. #892
-
0.37.119 Nov 2025 -
0.37.019 Nov 2025Release notes
Open source →Added
evaluate()top-level function for convenient access to structured validation output.- CLI: Schema-only validation now also validates all referenced schemas. #804
- Support for additional
contentEncodingvalues per RFC 4648:base64url,base32,base32hex, andbase16. These encodings are now validated alongside the existingbase64support in Draft 6 and 7. #26 validator.iter_errors(instance).into_errors(). It returns aValidationErrorstype that collects validation errors and implementsstd::error::Error. #451
Changed
- BREAKING:
ValidationErrorfields are private; useinstance(),kind(),instance_path(), andschema_path()instead of accessing struct fields directly. - BREAKING:
ErrorIteratoris now a newtype wrapper instead ofBox<dyn ValidationErrorIterator>.
Performance
validateand other APIs returningResult<_, ValidationError>are 5–10% faster in some workloads due to the smaller error handle.evaluate: Avoiding deep clones of unmatched keyword values (e.g.,title,description,examples) on every schema node evaluation by usingArcinternally. Can be multiple times faster for schemas with large annotations.
-
0.36.018 Nov 2025Release notes
Open source →Added
- CLI: Structured
--output flag|list|hierarchicalmodes now stream newline-delimited JSON records with schema/instance metadata plus JSON Schema Output v1 payloads (defaulttextoutput remains human-readable). - CLI:
--errors-onlyflag to suppress successful validation output and only show failures. - CLI: When invoked with only a schema file (no instances), validates the schema against its meta-schema. #804
- New
Validator::evaluate()API exposes JSON Schema Output v1 (flag/list/hierarchical) reports along with iterator helpers for annotations and errors. meta::validator_for()function to build validators for meta-schema validation with fullValidatorAPI access.Validatornow implementsClone. #809
Removed
Validator::apply(),Output, andBasicOutputtypes have been removed in favor of the richerevaluate()API.
- CLI: Structured
-
0.35.016 Nov 2025Release notes
Open source →Added
- Support for custom meta-schemas. Schemas with custom
$schemaURIs can now be used by registering their meta-schemas in theRegistryviajsonschema::options().with_registry(). #664 arbitrary-precisionfeature for exact numeric validation of large integers and decimals beyond standard floating-point limits. #103- Support for HTTPS
$schemaURIs for drafts 04, 06, and 07 (e.g.,https://json-schema.org/draft-07/schema). #802
Changed
- BREAKING:
meta::is_validnow panics for unknown$schemavalues instead of defaulting to Draft 2020-12.meta::validatereturns an error for unknown$schemavalues. Usemeta::options().with_registry()to validate schemas against custom meta-schemas. - BREAKING:
Resource::from_contentsno longer returnsResultand always succeeds, since draft detection no longer fails for unknown$schemavalues.
Removed
- BREAKING:
meta::try_is_validandmeta::try_validate. Usemeta::is_validandmeta::validateinstead. - BREAKING:
primitive_typemodule (deprecated since 0.30.0). Usejsonschema::typesinstead.
Performance
required: short-circuit when the instance object has fewer properties than required keys.
- Support for custom meta-schemas. Schemas with custom
-
0.34.014 Nov 2025Release notes
Open source →Changed
- BREAKING:
BasicOutputandAnnotationsno longer have lifetime parameters. Update type annotations fromBasicOutput<'a>toBasicOutputandAnnotations<'a>toAnnotations. referencing: URI caching now avoids hash collisions and reduces lock contention.- Update
fluent-urito0.4.1. - Bump MSRV to
1.83.0. - Drop the
Send + Syncbounds fromRetrieve/AsyncRetrieveonwasm32. - Use the new
draftX::meta::validator()helper so meta-schema validators lazy-init onwasm32while native targets keep borrowing the cachedjsonschema::meta::MetaValidator.
Fixed
- Hostname and IDN hostname formats now decode
xn--labels, reject leading combining marks/uppercase prefixes, and enforce the latest JSON Schema punycode context rules. - Restore
wasm32-unknown-unknownsupport. #785
Performance
applynow reuses cached schema locations, URI fragments, and buffers for up to ~2.5x faster validation.- Recursive and regular
$refcompilation deduplicates validator nodes, which decreases the memory usage and improves performance. - Validator compilation restores the regex cache for faster builds on regex-heavy schemas and precomputes absolute schema locations, trading a bit of compile time for faster
applyon location-heavy workloads. - Large schema compilation is significantly faster. #755
unevaluatedPropertiesvalidation is 25-35% faster through optimized property marking and early-exit paths.unevaluatedPropertiesmemory usage drastically reduced by eliminating redundant registry clones during compilation.unevaluatedItemsvalidation is ~10% faster through early-exit optimizations and eliminating redundant validations in combinators.
Removed
- BREAKING:
Validator::configto reduce the memory footprint. - BREAKING: Public
DRAFT4_META_VALIDATOR,DRAFT6_META_VALIDATOR,DRAFT7_META_VALIDATOR,DRAFT201909_META_VALIDATOR, andDRAFT202012_META_VALIDATORstatics. UsedraftX::meta::validator()helper functions instead (e.g.,draft7::meta::validator()).
- BREAKING:
-
0.33.024 Aug 2025Release notes
Open source →Fixed
- BREAKING:
instance_pathsegments are now unescaped when iterating.LocationSegment::Propertynow holdsCow<'_, str>andLocationSegmentis no longerCopy. #788
- BREAKING:
-
0.32.103 Aug 2025 -
0.32.029 Jul 2025Release notes
Open source →Added
- Added missing
contextfield toValidationErrorKind::OneOfMultipleValid.
Changed
- Improved error message for
enum.
- Added missing
-
0.31.027 Jul 2025Release notes
Open source →Added
- CLI: flag
-d, --draft <4|6|7|2019|2020>to enforce a specific JSON Schema draft. - CLI: flags
--assert-formatand--no-assert-formatto toggle validation offormatkeywords. - Added
contextforValidationErrorKind::AnyOfandValidationErrorKind::OneOfNotValidwhich contains errors for all subschemas, each inside a separate vector with an index matching subschema ID.
Fixed
- Improve the precision of
multipleOffor float values.
Changed
- Bump
fancy-regexto0.15.
- CLI: flag
-
0.30.016 Apr 2025Release notes
Open source →Added
JsonTypeandJsonTypeSet.ValidationOptions::with_base_urithat allows for specifying a base URI for all relative references in the schema.- Configuration options for the underlying regex engine used by
patternandpatternPropertieskeywords.
Changed
- Better error messages for relative
$refwithout base URI.
Fixed
- CLI: Inability to load relative file
$ref. #725
Removed
- Internal cache for regular expressions.
Deprecated
PrimitiveTypeandPrimitiveTypesBitMap.
-
0.29.127 Mar 2025Release notes
Open source →Added
Hash,PartialOrd,Ordandserde::SerializeforLocation.- Make
Location::joinpublic.
-
0.29.008 Feb 2025Release notes
Open source →Breaking Changes
-
All builder methods on
ValidationOptionsnow take ownership ofselfinstead of&mut self. This change enables better support for non-blocking retrieval of external resources during the process of building a validator. Update your code to chain the builder methods instead of reusing the options instance:// Before (0.28.x) let mut options = jsonschema::options(); options.with_draft(Draft::Draft202012); options.with_format("custom", my_format); let validator = options.build(&schema)?; // After (0.29.0) let validator = jsonschema::options() .with_draft(Draft::Draft202012) .with_format("custom", my_format) .build(&schema)?; -
The
Retrievetrait'sretrievemethod now accepts URI references as&Uri<String>instead of&Uri<&str>. This aligns with the async version and simplifies internal URI handling. The behavior and available methods remain the same, this is purely a type-level change.// Before fn retrieve(&self, uri: &Uri<&str>) -> Result<Value, Box<dyn std::error::Error + Send + Sync>> // After fn retrieve(&self, uri: &Uri<String>) -> Result<Value, Box<dyn std::error::Error + Send + Sync>> -
Simplified
Registrycreation API:- Removed
RegistryOptions::try_newandRegistryOptions::try_from_resourcesin favor ofRegistry::build - Removed
Registry::try_with_resource_and_retriever- useRegistry::options().retriever()instead - Registry creation is now consistently done through the builder pattern
// Before (0.28.x) let registry = Registry::options() .draft(Draft::Draft7) .try_new( "http://example.com/schema", resource )?; let registry = Registry::options() .draft(Draft::Draft7) .try_from_resources([ ("http://example.com/schema", resource) ].into_iter())?; let registry = Registry.try_with_resource_and_retriever( "http://example.com/schema", resource, retriever )?; // After (0.29.0) let registry = Registry::options() .draft(Draft::Draft7) .build([ ("http://example.com/schema", resource) ])?; let registry = Registry::options() .draft(Draft::Draft7) .build([ ("http://example.com/schema", resource) ])?; let registry = Registry::options() .retriever(retriever) .build(resources)?; - Removed
Added
- Support non-blocking retrieval for external resources during schema resolution via the new
resolve-asyncfeature. #385 - Re-export
referencing::Registryasjsonschema::Registry. ValidationOptions::with_registrythat allows for providing a predefinedreferencing::Registry. #682
Performance
- Significantly improved validator compilation speed by using pointer-based references to schema fragments instead of cloning them during traversal.
- Faster anchors & sub-resources lookups during validator compilation.
-