JSON8 Schema
Introduction
JSON Schema validator for JavaScript - work in progress; come back later
Implemented
- nested
- types
- integer
- array
- null
- object
- string
- number
- boolean
- Validation keywords
- metadata keywords
-
format
See also
- JSON8 JSON toolkit for JavaScript
- JSON8 Patch for JSON diffing and patching
- JSON8 Pointer for JSON Pointer (URL for JSON) implementation
- JSON8 Merge Patch for simpler JSON object diffing/patching alternative to JSON Patch and Pointer
Getting started
npm install json8-schema
var ooSchema = require('json8-schema');
or
<script src="node_modules/json8-schema/JSON8Schema.js"></script>
var ooSchema = window.JSON8Schema
Methods
validate
Returns true if the JSON value validates against the schema, false otherwise.
validate(schema, value) // true or false
Tests
npm install -g mocha babel browserify
npm test
Contributing
See CONTRIBUTING.md