lib/helpers/json-schema.js
function JsonSchema (schema) {
  if (!schema) {
    throw ono({ status: 500 }, "Missing JSON schema");
  }
  if (schema.type !== undefined && dataTypes.indexOf(schema.type) === -1) {
    throw ono({ status: 500 }, "Invalid JSON schema type: %s", schema.type);
  }

  this.schema = schema;
}
function JsonSchema (schema) {
  if (!schema) {
    throw ono({ status: 500 }, "Missing JSON schema");
  }
  if (schema.type !== undefined && dataTypes.indexOf(schema.type) === -1) {
    throw ono({ status: 500 }, "Invalid JSON schema type: %s", schema.type);
  }

  this.schema = schema;
}
function JsonSchema ( schema ) { if ( ! schema ) { throw ono ( { status : 500 } , "Missing JSON schema" ) ; } if ( schema . type !== undefined && dataTypes . indexOf ( schema . type ) === - 1 ) { throw ono ( { status : 500 } , "Invalid JSON schema type: %s" , schema . type ) ; } this . schema = schema ; }
Parses and validates values against JSON schemas.

@constructor
Parses and validates values against JSON schemas .