Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pirosikick/unschema
Generate example JSON from JSON Schema
https://github.com/pirosikick/unschema
json-schema node-js nodejs
Last synced: 25 days ago
JSON representation
Generate example JSON from JSON Schema
- Host: GitHub
- URL: https://github.com/pirosikick/unschema
- Owner: pirosikick
- License: mit
- Created: 2017-02-16T06:10:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-03-02T04:05:23.000Z (over 7 years ago)
- Last Synced: 2024-09-29T08:41:35.944Z (about 1 month ago)
- Topics: json-schema, node-js, nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/unschema
- Size: 56.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm version](https://badge.fury.io/js/unschema.svg)](http://badge.fury.io/js/unschema)
[![david](https://david-dm.org/pirosikick/unschema.svg)](https://david-dm.org/pirosikick/unschema)
[![Build Status](https://travis-ci.org/pirosikick/unschema.svg)](https://travis-ci.org/pirosikick/unschema)
[![codecov](https://codecov.io/gh/pirosikick/unschema/branch/master/graph/badge.svg)](https://codecov.io/gh/pirosikick/unschema)unschema
========Generate JSON from JSON Schema
## Usage
```js
const unschema = require('unschema');
console.log(unschema({ type: 'string' })); // 'ABCDEFGHIJ'
console.log(unschema({ type: 'number' })); // 0
console.log(unschema({ type: 'boolean' })); // trueconsole.log(unschema({
type: 'object',
properties: {
a: { type: 'string' },
b: { type: 'number' }
}
});
// => { a: 'ABCDEFGHIJ', b: 0 }
```## License
[MIT](http://pirosikick.mit-license.org/)