sdjschema
v1.2.4
Published
SDJSchema(Self Description JSON Schema) is a tool which describes data presence, data type and data constraint to a JSON object
Downloads
4
Maintainers
Readme
SDJSchema(Self Description JSON Schema)
SDJSchema is a tool that validates JSON members matched with the descriptions of data presence, type, and constraint.
SDJSchema includes a group of rules and notations which describe data presence, data type and data constraints to a JSON data, the rules and notations don't change any key-value pairs in JSON, they are extra members to JSON.
SDJS-Web is a version of SDJSchema specified for web browsers. To access SDJS-Web repository for the details.
Documentation
To see Self Description JSON Schema
Installation
$ npm install sdjschema
Usage
const { valiSdjs } = require('sdjschema');
// supposing that sdjsObj is a JSON object with Self Description JSON Schema
if ( valiSdjs(sdjsObj) ) {
console.log("validation succeeded.");
} else {
console.log("validation failed.");
}
Tests
Runs the following commands from your project.
$ cd ./node_modules/sdjschema
$ npm test
Enhancing data exchanges
Creating and consuming validatable data cross networks with SDJSchema.
License
MIT