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

AlexIssayev/json-schema-validator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read me first

IMPORTANT: if you report a bug, please mention what version you are using!

The current version is 0.5.0beta3.

The old, still maintained version is 0.4.1. See the [ChangeLog](https://github.com/fge/json-schema-validator/wiki/ChangeLog) for more details.

What it is

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.

The current version (0.5.x) has the following features:

  • full draft v3 validation (except for the color and style format specifiers, which nobody uses anyway, right?);
  • arbitrary length/precision number validation;
  • ECMA 262 regexes (using Rhino), as required by the draft;
  • schema caching for performance;
  • schema syntax validation (also cached);
  • full $ref support, including id resolving and loop detection;
  • thread safe validators (0.4.x validation is not thread safe).

Features in 0.4.x which are not yet in 0.5.x (some of these are of questionable use anyway):

  • experimental draft v4 validation;
  • full report or fail-fast report modes (ie, go deep or fail at first error);
  • ability to register URI handlers for any scheme (HTTP only natively);
  • 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.

Note that $ref support in 0.4.x is flaky.

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