Status: Draft
Version: 1.0
Authors: Kris Zyp
Developers:Kris Zyp
Available:since V1.2

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);
if (results.valid){
  // indicates that the instance is valid by the schema

dojox/json/schema (last edited 2008-10-06 23:56:25 by MarcusReimann)