public final class Example2 extends ExampleBase
This example uses the same schema with one difference: the mntent
subschema is now referenced via inline addressing using an id
.
The schema used for validation is here.
In order to use inline schema addressing, we cannot use the default
factory: we must go through JsonSchemaFactory.Builder
and use the JsonSchemaFactory.Builder.addressingMode(AddressingMode)
method, specifying that we want
AddressingMode.INLINE
addressing.
Apart from these, the files used for validation and validation results
are the same as Example1
.
AddressingMode
Constructor and Description |
---|
Example2() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String... args) |
loadResource, printReport
public static void main(String... args) throws IOException
IOException
Copyright © 2013. All Rights Reserved.