0.1.0 • Published 10 years ago

json8-schema v0.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
10 years ago

JSON8 Schema

build status

Introduction

JSON Schema validator for JavaScript - work in progress; come back later

Implemented

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