Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.markdown

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. For a list of planned features for next versions, see here.

Please see the wiki for more details.

Something went wrong with that request. Please try again.