-
Notifications
You must be signed in to change notification settings - Fork 400
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!
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.
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.
This means you can use only one validation processor in all of your application.
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.
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.
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.