Nine Pedestrians Mesmerized

    sdjschema

    1.2.4 • Public • Published

    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

    Install

    npm i sdjschema

    DownloadsWeekly Downloads

    2

    Version

    1.2.4

    License

    MIT

    Unpacked Size

    32.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • rdli