json-schema-benchmark

Benchmarks for Node.js JSON-schema validators

  • Owner: ebdrup/json-schema-benchmark
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

json-schema-benchmark

Performance benchmark for Node.js JSON-schema validators.

Also tests against official JSON-schema test suite and checks
for validators that cause side-effects on schema or data.

Contribute to these benchmarks

Performance

![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=29,4,1&chs=600x416&chxl=-1:, djv, ajv, jsen, json-schema-validator-generator, is-my-json-valid, themis, jsck, z-schema, json-schema-library, skeemas, jsonschema, tv4&chd=t:100,75.2,48.9,38.3,36.4,9.2,3,1.5,0.6,0.6,0.5,0.1), Validator, Relative speed, Number of test runs per second, ---------, :------------:, :----------------------------:, djv, 100%, 69525 (± 1.32%), ajv, 75.2%, 52283 (± 10.9%), jsen, 48.9%, 33971 (± 1.49%), json-schema-validator-generator, 38.3%, 26627 (± 3.21%), is-my-json-valid, 36.4%, 25308 (± 1.86%), themis, 9.2%, 6376 (± 9.72%), jsck, 3%, 2102 (± 2.07%), z-schema, 1.5%, 1030 (± 2.07%), json-schema-library, 0.6%, 396 (± 1.75%), skeemas, 0.6%, 389 (± 0.94%), jsonschema, 0.5%, 336 (± 2.96%), tv4, 0.1%, 76 (± 2.43%), 235 tests are run in each test run.

Validators tested: json-schema-validator-generator (1.1.9), is-my-json-valid (2.9.4), jsen (0.6.6), ajv (6.9.2), themis (1.1.6), z-schema (4.1.1), jjv (1.0.2), djv (2.1.2), skeemas (1.2.5), schemasaurus (0.7.8), jsck (0.3.2), jassi (0.1.2), JSV (4.0.2), request-validator (0.3.3), json-gate (0.8.9), json-model (0.2.9), tv4 (1.3.0), jsonschema (1.2.4), revalidator (0.3.1), json-schema-library (4.0.0),

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

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

The fastest validator has 100%, the rest a lower score relative to the fastest.
If a validator has a score of 5% that means that it's speed is 5% of the fastest,
meaning that it's 20 times slower than the fastest.

Test failure summary

This test suite uses the official JSON-schema test suite.

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

![failing tests](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=16,4,1&chs=600x420&chxl=-1:, json-schema-library, djv, jsonschema, skeemas, ajv, jsen, z-schema, is-my-json-valid, jjv, schemasaurus, jsck, themis, tv4, json-schema-validator-generator, request-validator, jassi, json-model, JSV, json-gate, revalidator&chd=t:1,1,6,6,7,9,13,14,26,29,29,30,33,34,39,42,54,72,97,152&chxr=0,0,152&chds=0,152), Validator, Number of failing tests (click for details), ---------, -----------------------, json-schema-library, 1, djv, 1, jsonschema, 6, skeemas, 6, ajv, 7, jsen, 9, z-schema, 13, is-my-json-valid, 14, jjv, 26, schemasaurus, 29, jsck, 29, themis, 30, tv4, 33, json-schema-validator-generator, 34, request-validator, 39, jassi, 42, json-model, 54, JSV, 72, json-gate, 97, revalidator, 152, 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), ---------, ----------------------------, tv4, 11, revalidator, 320, json-model, 338, Validators not in the list have no side-effects on data or schemas.

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 themis

Benchmarks owned by z-schema

Benchmarks owned by jsck

There is also a benchmark suite
by cosmicrealms.

License

MIT

Main metrics

Overview
Name With Ownerebdrup/json-schema-benchmark
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2015-01-28 12:58:36
Pushed At2024-07-04 03:06:14
Last Commit At2020-11-30 10:37:18
Release Count0
用户参与
Stargazers Count387
Watchers Count18
Fork Count39
Commits Count164
Has Issues Enabled
Issues Count21
Issue Open Count4
Pull Requests Count18
Pull Requests Open Count13
Pull Requests Close Count17
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private