The license of this project is LGPLv3 or later. See file src/main/resources/LICENSE for the full text.
A sample web application using this library is available here (source of this webapp here). This project also has a dedicated Google group.
Versions:
If you are looking for a quick start, see the code examples. You can see what is new in 1.4.x here.
Warning: the artifact and package namespace has changed starting with version 1.5.3
In the examples below, substitute your-version-here for the version you want.
<dependency>
<groupId>com.github.fge</groupId>
<artifactId>json-schema-validator</artifactId>
<version>your-version-here</version>
</dependency>
<dependency>
<groupId>org.kitchen-eel</groupId>
<artifactId>json-schema-validator</artifactId>
<version>your-version-here</version>
</dependency>
The versioning scheme is defined by the middle digit of the version number:
- if this number is even, then this is the stable version; no new features will be added to such versions, and the user API will not change (save for some additions if requested).
- if this number is odd, then this is the development version; new features will be added to those versions only, and the user API may change.
This is an implementation of all validation aspects (schema syntax validation; instance, aka JSON data, validation) of the JSON Schema specification written in pure Java. This allows pure server side JSON schema validation if this is what you are looking for.
This implementation has the following features:
- thread safe, concurrent-friendly validation;
- very fast;
- full draft v3 validation, including hyper schema;
- draft v4 validation;
- $schema detection;
- full schema addressing support;
- validation of numeric JSON instances of arbitrary scale/precision;
- ECMA 262 regexes (using Rhino);
- extensive customization: (un)registering URI schemes, setting namepaces, redirections, registering schemas/keywords, others.
Currently, JSON Schema is not an official RFC. In fact, the existing draft is obsolete -- but it is used on the Internet nonetheless. This implementation is based on the following drafts:
- draft v4 as currently defined by the JSON Schema working group;
- JSON Schema Internet draft, version 3;
- JSON Reference Internet draft, version 3;
- JSON Pointer Internet draft, version 8.
For a detailed discussion of the implementation, see here. For a list of planned features for next versions, see here.
Please see the wiki for more details.