Package org.eel.kitchen.jsonschema.format

Format specifier classes

See: Description

Package org.eel.kitchen.jsonschema.format Description

Format specifier classes

The format keyword is defined by section 5.23 of the current draft. This particular package supports the following format specifiers:

All other format specifiers defined by the draft (except color and style, for which support is deliberately omitted) are now in a separate package: json-schema-formats .

In addition to using the package above, you can also implement your own format specifiers by creating a FormatBundle and setting/merging your bundle into your schema factory. See also FormatSpecifier.

Note: by default, the host-name and email format specifiers require that both validated values have a domain part. This contradicts what the respective RFCs say, but it is more in line with user expectations. You can tell these formats to strictly comply to the RFC by setting ValidationFeature.STRICT_RFC_CONFORMANCE when building your schema factory (see JsonSchemaFactory.Builder.enableFeature(org.eel.kitchen.jsonschema.main.ValidationFeature)).

Copyright © 2012. All Rights Reserved.