百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
J

json-schema-benchmark

> 编程语言
开源

Node.js JSON-schema 验证器的基准

387 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Node.js JSON-schema 验证器的基准

json-schema-benchmark (draft6)

Performance benchmark for Node.js JSON-schema validators.

Also tests against official JSON-schema test suite, version draft6. and checks for validators that cause side-effects on schema or data. The top 6 validators that fail the least tests are included in the benchmark.

Contribute to these benchmarks

Performance

Validator Relative speed Number of test runs per second
ajv 100% 17000 (± 0.34%)
@exodus/schemasafe 69.2% 11760 (± 0.89%)
is-my-json-valid 51.5% 8757 (± 0.37%)
djv 13.1% 2223 (± 1.24%)
@cfworker/json-schema 5.1% 865 (± 1.15%)
jsonschema 1.2% 198 (± 1.11%)

884 tests are run in each test run.

Validators tested: @exodus/schemasafe (1.0.0-rc.3), @cfworker/json-schema (1.6.3), ajv (6.12.6), jsonschema (1.4.0), djv (2.1.3-alpha.0), is-my-json-valid (2.20.5), json-schema-library (4.1.4), jsen (0.6.6), tv4 (1.3.0), z-schema (5.0.0), jjv (1.0.2), jassi (0.1.2), themis (1.1.6), request-validator (0.3.3), json-schema-validator-generator (1.1.11), json-model (0.2.24), jsck (0.3.2), JSV (4.0.2), skeemas (1.2.5), schemasaurus (0.7.8), json-gate (0.8.23), revalidator (0.3.1),

(validators not in the results above where excluded because of failing tests - see below for details)

ajv is currently the fastest JSON-schema validator out there.

Test failure summary

This test suite uses the official JSON-schema test suite, version draft6.

If a validator does not pass a test in the official test suite, it will show up in these results.

Validator Number of failing tests (click for details)
@exodus/schemasafe 8
@cfworker/json-schema 9
ajv 10
jsonschema 33
djv 99
is-my-json-valid 111
json-schema-library 140
jsen 141
tv4 155
z-schema 169
jjv 171
jassi 172
themis 189
request-validator 207
json-schema-validator-generator 216
json-model 225
jsck 227
JSV 234
skeemas 235
schemasaurus 237
json-gate 342
revalidator 384

Some validators have deliberately chosen not to support parts of the spec. Go to the homepage of the validator to learn if that is the case for these tests.

Side-effects summary

Number of tests that caused side-effects. The schema or data was altered by the validator.

Validator Number of side-effects (BAD)
revalidator 818
json-model 833

Validators not in the list have no side-effects on data or schemas.

Tests for other JSON-schema versions

  • draft7
  • draft6
  • draft4

Features of validators

Note that these benchmarks and tests do not take into account other more advanced features of the validators. I encourage you to take a look at each validator if you are looking for special features.

Benchmarks by validator authors and others

Several of the validators have build benchmarks themselves. They are more detailed then the benchmarks provided above.

Benchmarks owned by z-schema

Benchmarks owned by themis

Benchmarks owned by jsck

There is also a benchmark suite by cosmicrealms.

License

MIT

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言