Skip to content

A JSON Schema validation implementation in pure Java, which aims for correctness and performance, in that order

Notifications You must be signed in to change notification settings

dimaj/json-schema-validator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read me first

The license of this project is LGPLv3 or later. See file src/main/resources/LICENSE for the full text.

Versions:

You can see what is new in 1.2.x here.

Note: this implementation does not cover the full set of format attributes defined by the currently active draft, and this is on purpose. See json-schema-formats. If you need some format attributes not supported by this package, consider depending on the latter package instead, which depends on this one.

Note: the javadoc contains code samples.

Versioning scheme policy

The versioning scheme is defined by the middle number 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 only see incremental changes, never modifications;
  • 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.

What it is

This is an implementation 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 (however, see above for format);
  • full $ref support, including id resolving and loop detection;
  • validation of numeric JSON instances of arbitrary scale/precision;
  • ECMA 262 regexes (using Rhino);
  • ability to register/unregister URI handlers for arbitrary URI schemes;
  • ability to set a default URI namespace;
  • ability to define URI redirections;
  • ability to register/unregister keywords and format attributes.

Relevant documents

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:

More...

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.

About

A JSON Schema validation implementation in pure Java, which aims for correctness and performance, in that order

Resources

Stars

Watchers

Forks

Packages

No packages published