Vitesse JSON Schema Validator
The Vitesse JSON Schema Validator leverages the Vitesse library to allow you to enjoy high performance JSON Schema validation compliant with the 4th Draft of JSON Schema.
To use the validation library simply do the following.
var Compiler = ; // Our Draft 4 schemavar schema = "properties": "foo": "type": "integer" "default": var compiler = ;compiler;
The options
object supports a single value closure:boolean
that if set to true will make Vitesse attempt to compile the schema using the Google Closure compiler.
The compiler
function will also perform $ref
resolution of schemas, fetching the needed resources from the internet. If you don't have $ref
schema entries or do not wish to use the Closure Compiler you can use the compileSync
method instead.
var Compiler = ; // Our Draft 4 schemavar schema = "properties": "foo": "type": "integer" "default": var compiler = ;var validator = compilervar results = validator;consoledirresults;