-
Notifications
You must be signed in to change notification settings - Fork 399
Features
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!
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
.
It also uses ECMA 262 regexes, like the standard dictates, and detects $schema
, which means it switches automatically between drafts v3 and v4.
This library makes good use of Guava's LoadingCache to provide validation which is not only thread-safe, but also concurrent-friendly and very fast.
This means you can use one JsonSchema
instance in all your threads without a second thought.
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, FTP, file
, and loading resources from your classpath using a custom URI scheme named resource
:
final JsonSchema schema = factory.fromURI("resource:/path/to/resource");
It also support jar URLs (even relative refs work!) and detects reference loops.
You can register (or unregister) any of the following:
- syntax validators;
- keyword validators;
- format attributes.
You can even register complete metaschemas of your own with your own $schema
, and they will be used.