github Stranger6667/jsonschema rust-v0.37.0
[Rust] Release 0.37.0

latest releases: ruby-v0.46.4, python-v0.46.4, rust-v0.46.4...
5 months ago

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 contentEncoding values per RFC 4648: base64url, base32, base32hex, and base16. These encodings are now validated alongside the existing base64 support in Draft 6 and 7. #26
  • validator.iter_errors(instance).into_errors(). It returns a ValidationErrors type that collects validation errors and implements std::error::Error. #451

Changed

  • BREAKING: ValidationError fields are private; use instance(), kind(), instance_path(), and schema_path() instead of accessing struct fields directly.
  • BREAKING: ErrorIterator is now a newtype wrapper instead of Box<dyn ValidationErrorIterator>.

Performance

  • validate and other APIs returning Result<_, ValidationError> are 5–10% faster in some workloads due to the smaller error handle.
  • evaluate: Eliminated deep clones of unmatched keyword values (e.g., title, description, examples) on every schema node evaluation by using Arc internally. It can be multiple times faster for schemas with large annotations.

Don't miss a new jsonschema release

NewReleases is sending notifications on new releases.