Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including sjot with all npm packages installed. Try it out:

var SJOT = require("sjot"); var schema = { "@root": { "name": "string", "v?1.0": "number", "tags?": "string{1,}", "package": { "id": "1..", "name": "char[1,]" } } }; var data = { "name": "SJOT", "v": 1.1, "tags": [ "JSON", "SJOT" ], "package": { "id": 1, "name": "sjot" } }; try { SJOT.validate(data, "@root", schema); console.log("OK! JSON data is valid"); } catch (e) { console.log(e); }

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

sjot v1.4.4

Schemas for JSON Objects, or simply SJOT, offers faster JSON validation and type checking with lightweight schemas and compact validators. SJOT schemas have the look and feel of object templates and are easy to use.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free