Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

json-schema-benchmark

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-schema-benchmark

Benchmarks for Node.js JSON-schema validators

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-42.86%
Maintainers
1
Weekly downloads
 
Created
Source

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

ValidatorRelative speedNumber of test runs per second
ajv100%20121 (± 0.57%)
jsen63.4%12754 (± 0.75%)
is-my-json-valid59.7%12011 (± 0.67%)
schemasaurus17.3%3485 (± 2.51%)
themis12.2%2446 (± 1.64%)
z-schema6.3%1275 (± 1.55%)
jjv3.8%763 (± 2.7%)
jsck2.6%528 (± 3.75%)
jsonschema0.6%128 (± 2.8%)
skeemas0.6%125 (± 3.43%)
request-validator0.4%78 (± 3.25%)
tv40.2%32 (± 4.48%)
jayschema0.1%13 (± 6.01%)

Validators tested: is-my-json-valid, jsen, ajv, themis, z-schema, jjv, skeemas, jayschema, schemasaurus, jsck, jassi, JSV, request-validator, json-gate, json-model, tv4, jsonschema, revalidator,

(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.

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

ValidatorNumber of failing tests (click for details)
ajv1
skeemas1
z-schema3
jsonschema3
jjv4
is-my-json-valid9
jayschema10
jsen11
themis13
schemasaurus15
jsck21
tv424
request-validator26
jassi31
json-model40
JSV54
json-gate70
revalidator199

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.

ValidatorNumber of side-effects (BAD)
tv42
revalidator147
json-model283

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

Keywords

FAQs

Package last updated on 14 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc