Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Integrate-Archives/json2schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-schema-generator

Generate JSON Schema from JSON Objects.

Installation

$ npm install -g json2schema

Usage

CLI Tool

$ json2schema -h

  Usage: json2schema [options] <URL|filename>

  Convert JSON Objects to JSON Schema.

  Options:

    -h, --help       output usage information
    -V, --version    output the version number
    -o, --out <out>  Specify the path and filename you want to output your schema document to. Defaults to "./schema.json"

In your JavaScript

var Coverter = require('json2schema');

var generatedSchema = Converter.convert({
	data: <JSONObject>
});

Example

$ json2schema ./jsondocs/myObject.json --out ../../schema.json

Contributing

Contributions are welcomed and encouraged. See CONTRIBUTING.md for instructions.

About

Generate JSON Schema from JSON Objects.

Resources

License

Stars

Watchers

Forks

Packages

No packages published