[Rust] Release 0.53.0
·
228 commits
to master
since this release
Added
Location::segments, iterating the segments without collecting them.CanonicalizeOptions::prepare, canonicalizing any number of a document's subschemas by JSON Pointer, with the document indexed once.- CLI: the
--at POINTERflag ofjsonschema canonicalize, canonicalizing only the subschema at that pointer without breaking its references into the rest of the document. - CLI:
jsonschema canonicalizereads YAML schemas (.yaml/.yml) as well as JSON. canonical::{ArrayView, IntegerView, NumberView, ObjectView, StringView, TypedGroupView}, the payload types ofCanonicalView, so consumers can name them in signatures.
Fixed
jsonschema-valuefailing to build withdefault-features = false.jsonschema-valuefailing to build forwasm32-unknown-unknown, which needsgetrandom'swasm_jsbackend.- Draft 4
type: integeraccepting numbers written with an exponent, like1e2. - Draft 4
type: integeranswering differently for the same number across representations. uniqueItemsaccepting0alongside-0.0in arrays of more than 15 items.
Performance
- Canonicalizing an
allOfof object schemas walks their property maps once instead of looking every key up. propertiesandrequiredcompare short names withoutmemcmp.- Building a schema is up to 5% faster, from cheaper cache sharing and resolving each
$reftarget once. - Building a schema with an
$idis up to 15% faster, from encoding each absolute location once. requiredscans small objects once instead of looking up each key.enumlisting strings or integers, with or withoutnull, matches against a set instead of comparing each candidate.evaluateis up to 33% faster, from rendering each node's locations once.- CLI: 1.4-1.5x faster on large schemas, from reading files before parsing them.
- Draft 4
type: integerwitharbitrary-precisionno longer allocates a string per number. type: integer, andtypesets containing it, are up to 54x faster on float-heavy instances witharbitrary-precision.- Draft 4
type: integeris up to 20x faster for thePyo3andMagnusrepresentations.