public final class Example4
extends java.lang.Object
This demonstrates two capabilities of JsonSchemaFactory:
The implementation provides a resource scheme which allows to Utils.load
JSON from files in the classpath. It is strictly equivalent to calling Class.getResourceAsStream(String).
The URI used is resource:/org/eel/kitchen/jsonschema/examples/fstab-sub.json. Because we
want to validate against the fstab subschema, we use JsonSchemaFactory.getJsonSchema(String) to Utils.load the actual schema; the URI
used as an argument also has a JSON Pointer as a fragment.
Files validated, and the validation outputs, are the same as for Example2.
| Constructor and Description |
|---|
Example4() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String... args) |
public static void main(java.lang.String... args)
throws java.io.IOException,
ProcessingException
java.io.IOExceptionProcessingException