Using the JSON Schema Test Suite, we test each library against the official JSON Schema specification. The test suite contains a large number of test cases that cover various aspects of JSON Schema validation, including different data types, formats, and validation rules.
Libraries that have their own representations of schemas, but can be created from JSON Schema, such as zod or arktype.
Copy to clipboardconst zodSchema = z.fromJSONSchema(schema); const receivedValid = zodSchema.safeParse(data).success; assert(receivedValid === expectedValid);
Results indicate how closely the library aligns with the formal semantics of JSON Schema.
| Library | Version | Source | /wk | Compliance | ||||
|---|---|---|---|---|---|---|---|---|
zod | Code snippet | 4.4.3 | Native | n/a | 63.2% (801 / 1.27K) | Open details | ||
sury | Code snippet | 11.0.0-rc.1 | Native | n/a | 59.2% (751 / 1.27K) | Open details | ||
arktype | Code snippet | 2.2.3 | Package | Package required@ark/json-schema | n/a | 22.6% (287 / 1.27K) | Open details | |