A simple tool for instantiating JSON Schemas!
Amended to support anyOf
(jmanoto)
npm install git+https://git@github.com/jmanoto/jsck.git
var instantiator = require('json-schema-instantiator');
...
var schema = {
"type": "object",
"properties": {
"title": {
"type": "string",
"default": "Example"
}
}
}, instance = instantiator.instantiate(schema);
// instance === { title: "Example" }