Skip to content

Features

Francis Galiegue edited this page Jun 30, 2013 · 6 revisions

No dependencies on...

This library does not depend on a log framework nor any Web framework. Which means you can use it anywhere. It is even used on Android!

Extensive customization

This library's dependency on json-schema-core means you have all the power of this library at your disposal: customized reporting and exception handling, customized processing chains, etc etc.

The full validation processor being itself a processor, it means you can chain it with other processors of your choice.

Full draft v3 and draft v4 validation support

And in addition, it can validate numeric data of arbitrary scale and/or precision. It is still, as far as I know, the only library able to do that.

It also has complete format support, except for color and style, and adds many other custom format attributes: md5, sha1, sha256, sha512, json-pointer, uri-template, uuid.

It also uses ECMA 262 regexes, like the standard dictates, and detects $schema, which means it switches automatically between drafts v3 and v4.

All processors are immutable (and, as a consequence, thread safe)

This means you can use only one validation processor in all of your application.

Syntax validation and instance validation

You can use this library to validate instances against JSON Schemas, but also to validate JSON Schemas more fully than what the core meta schema can do.

Extensive schema loading customization

This library allows you to:

  • preload schemas, at a given URI;
  • redirect URI namespaces;
  • register a downloader for any URI scheme of your choice (or unregistering schemes which you don't want).

It has builtin support for HTTP, HTTPS, FTP, file, and loading resources from your classpath using a custom URI scheme named resource:

final JsonSchema schema = factory.getJsonSchema("resource:/path/to/resource");

It also support jar URLs (even relative refs work!) and detects reference loops.

Extensive validation customization

You can:

  • register (or unregister) completely new keywords and/or format attributes;
  • disable format validation (enabled by default).

And of course, as mentioned above, since the validation processor is a processor, you can chain it with additional checks of your choice if these mechanisms are not enough for you.