The next step is to pick a JSON Schema validation library. The json-schema.org (https://json-schema.org/) provides a list of validators which you can read at json-schema.org/implementations.html. When choosing a schema validation library, we are looking for two things: performance (how quick it is) and conformity (how closely it conforms to the specification).
An open-source developer from Denmark, Allan Ebdrup, has created a set of benchmarks that compare these libraries. You can find it at github.com/ebdrup/json-schema-benchmark. The benchmark shows that the Dynamic JSON Schema Validator (djv, github.com/korzio/djv) is the fastest and also has fewest failing tests (only 1). The second fastest library is Another JSON Schema Validator (ajv, github.com/epoberezkin/ajv), which also only has a single failing test:
| Library | Relative Speed | Number of failing tests |
| djv v2.0.0 (fastest) | 100% | 1 |
| ajv v5.5.1 | 98% | 1 |
| is-my-json-valid v2.16.1 | 50.1% | 14 |
| tv4 v1.3.0 | 0.2% | 33 |
Therefore, djv seems like an obvious choice. However, developer and community support are also important factors to consider. So, let's take some of the most popular libraries and examine their number of GitHub stars, the number of weekly downloads from npmjs.com, and the number of dependent repositories and packages*:
| Library | GitHub Repository | Version | GitHub stars | Weekly downloads | Number of Contributors | Dependent | |
| Repositories | Packages | ||||||
| ajv | epoberezkin/ajv | 6.5.3 | 4,117 | 12,324,991 | 74 | 1,256,690 | 2,117 |
| tv4 | geraintluff/tv4 | 1.3.0 | 1,001 | 342,094 | 22 | 8,276 | 486 |
| jsonschema | tdegrunt/jsonschema | 1.2.4 | 889 | 214,902 | 39 | 18,636 | 727 |
| is-my-json-valid | mafintosh/is-my-json-valid | 2.19.0 | 837 | 2,497,926 | 23 | 463,005 | 267 |
| JSV | garycourt/JSV | 4.0.2 | 597 | 211,573 | 6 | 9,475 | 71 |
| djv | korzio/djv | 2.1.1 | 134 | 1,036 | 6 | 36 | 10 |
As you can see, although djv is the best solution technically, Ajv has the most downloads and number of contributors—signs that the project is well-supported by the community.
Apart from these metrics, you may also want to examine the following:
- The date of its last meaningful commit to the master branch (this excludes version bump and formatting changes)—for instance, the last commit to the JSV library was on 11 Jul 2012; therefore, although it may still have a lot of active users, we should not use a library that's no longer maintained
- The number of open issues
- The frequency of releases
All of these factors will give you an indication of whether the tool is being actively developed.
Taking everything into account, it seems like Ajv is the obvious choice, as it has the right balance between performance, conformity, and community support.