Skip to content

intercellular/jsonschema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsonschema

JSON Schema Validator in Cell.js

Demo

Check out the demo here

Usage

There are two ways (You can see an actual usage here: https://github.com/intercellular/jsonschema/blob/master/index.html#L30) :

1. Initialize with static value

Use the value attribute to initialize with your own value.

var app = App({
  schema: {
    value: {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      }
    }
  },
  data: {
    value: {
      "name": "Ethan"
    }
  }
});

2. Initialize with remote JSON

Use the url attribute to fetch a remote JSON object for usage.

var app = App({
  schema: {
    url: "./example/schema.json"
  },
  data: {
    url: "./example/data.json"
  }
});

About

JSON Schema Validator in Cell.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published