Overview of jsonschema library features
boonThe jsonschema library is a Go implementation for JSON Schema validation. Key features include:
- Multi-Draft Support: Supports Draft 4, 6, 7, 2019-09, and 2020-12.
- Cycle Detection: Detects infinite loops in
$schemacycles and validation cycles. - Extensibility: Supports custom
$schemaURLs, custom regex engines, custom vocabularies, and custom format/content assertions. - Format Assertions: Includes built-in formats like
uuid,email,ipv4,date-time,semver, and more. Note that format assertions must be explicitly enabled for drafts >= 2019-09. - Content Assertions: Supports
contentEncoding(e.g.,base64) andcontentMediaType(e.g.,application/json). These must be explicitly enabled for drafts >= 7. - Error Handling: Provides introspectable errors with a hierarchy, including an alternative display using
#for locating errors.