Skip to content

kingargyle/json-schema-validator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an implementation of the [JSON Schema specification](http://www.json-schema.org) written in pure Java. This allows pure server side JSON schema validation if this is what you are looking for.

The draft serving as a reference is, at the moment, draft version 3, which can be found [here](http://json-schema.org/draft-03/schema) (version 4 is around the corner, for some defintion of "corner" -- understand, days, or a few weeks).

Version 0.4 is out, and should show up on Maven very soon. see [here] (https://github.com/fge/json-schema-validator/wiki/ChangeLog) for a list of features. It now has experimental draft v4 support.

Small overview of available features:

  • full draft v3 validation support, and experimental draft v4 validation support;
  • full report or fail-fast report modes (ie, go deep or fail at first error);
  • arbitrary length/precision number validation;
  • validator and schema caching for performance;
  • ECMA 262 regexes (using Rhino), as required by the draft;
  • schema syntax validation, and the possibility to skip it;
  • ability to register URI handlers for any scheme (HTTP only natively);
  • complete $ref support, with loop detection;
  • ability to determine the default schema version to use (draft v3 by default);
  • ability to register/unregister keywords against a specific schema version;
  • automatic schema version switching if $schema is encountered within a schema.

I believe this to be the most complete implementation of JSON Schema in Java today.

For a detailed discussion of the implementation, see [here](https://github.com/fge/json-schema-validator/wiki/Status). For a list of planned features for next versions, see [here](https://github.com/fge/json-schema-validator/wiki/Roadmap).

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