public final class Example7 extends Object
This demonstrates JsonSchemaFactory's ability to register a
custom URI scheme. In this example, the scheme is foobar, and it is
simply an alias to fetch a resource from the current package.
Two things are needed:
URIDownloader for this scheme,LoadingConfigurationBuilder.addScheme(String, URIDownloader).Once this is done, this scheme, when encountered anywhere in JSON
References, will use this downloader, and you are also able to use it when
loading schemas using JsonSchemaFactory.getJsonSchema(String), which
is what this example does.
The schema and files used are the same as for Example2.
| Constructor and Description |
|---|
Example7() |
public static void main(String... args) throws IOException, ProcessingException
IOExceptionProcessingException