com.github.fge.jsonschema.examples
Class Example7
java.lang.Object
com.github.fge.jsonschema.examples.Example7
public final class Example7
- extends Object
Seventh example: custom URI scheme
link to source code
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:
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Example7
public Example7()
main
public static void main(String... args)
throws IOException,
ProcessingException
- Throws:
IOException
ProcessingException