com.github.fge.jsonschema.examples
Class Example2

java.lang.Object
  extended by com.github.fge.jsonschema.examples.ExampleBase
      extended by com.github.fge.jsonschema.examples.Example2

public final class Example2
extends ExampleBase

Second example: inline schema addressing

link to source code

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 a JsonSchemaFactoryBuilder and use a modified LoadingConfiguration to tell that we want to use inline dereferencing.

Apart from these, the files used for validation and validation results are the same as Example1.

See Also:
Dereferencing

Constructor Summary
Example2()
           
 
Method Summary
static void main(String... args)
           
 
Methods inherited from class com.github.fge.jsonschema.examples.ExampleBase
loadResource, printReport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Example2

public Example2()
Method Detail

main

public static void main(String... args)
                 throws IOException,
                        ProcessingException
Throws:
IOException
ProcessingException


Copyright © 2014. All Rights Reserved.