com.github.fge.jsonschema.examples
Class Example3

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

public final class Example3
extends ExampleBase

Third example: draft v3 detection via $schema

link to source code

This shows a basic usage example. This is the same source code as for Example1, except this time the schema (here) conforms to draft v3 instead of draft v4 (the $schema value differs).

One thing to note is a difference in the validation messages: while required properties are described using the required keyword, with draft v3, they were in charge of the properties keyword.


Constructor Summary
Example3()
           
 
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

Example3

public Example3()
Method Detail

main

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


Copyright © 2014. All Rights Reserved.