Package org.eel.kitchen.jsonschema.format

Format attribute classes

See: Description

Package org.eel.kitchen.jsonschema.format Description

Format attribute classes

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

All other format attributes 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 attributes by creating a FormatBundle and setting/merging your bundle into your schema factory. See also FormatAttribute.

Note: by default, the host-name and email format attributes 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.