Author:Kris Zyp
Project owner:Kris Zyp

dojox.json.schema implements JSON Schema to provide data validation against JSON Schemas.


JSON Schema can used to define the structure of data, constraints, and structural information using JSON. JSON Schema is used for type definitions in Service Mapping Description (SMD) used by the web services. JSON Schema is also supported in the JsonRestStore. Current development of JSON Schema is taking place in the JSON Schema Discussion Group.


The basic usage of dojox.json.schema validate data is:

obj = {foo:"bar"};
schema = {properties:{foo:{type:"string"}}};
results = dojox.json.schema.validate(obj, schema);
  // indicates that the instance is valid by the schema
Error in the documentation? Can’t find what you are looking for? Let us know!