1.3.0 • Published 10 years ago

json-to-schema-fork v1.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

JSON TO JSON-Schema

FORK from https://www.npmjs.com/package/json-to-schema

convert raw JSON to json-schema.

npm install json-to-schema-fork --save

使用

var JSONToSchema = require( 'json-to-schema-fork' );


console.log( JSONToSchema( {
    name: 'lalal',
    age: 12
});

/**
 * output:
 {
    type: 'object',
    description: '',
    properties: {
        name: {
            type: 'string',
            description: ''
        },
        age: {
            type: 'integer',
            description: ''
        }
    }
 }
 */

GITHUB

1.3.0

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago