Skip to content

JSON文件或者JavaScript对象转换成JSON-SCHEMA校验规则对象。

Notifications You must be signed in to change notification settings

mind029/json2schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json2schema

JSON文件或者JavaScript对象转换成JSON-SCHEMA校验规则对象。

安装

npm install @mind029/json2schema --save

Node.js 用法

const Convert = require("@mind029/json2schema")
const c = new Convert()
const data = {
  id:1,
  name:"mind",
  age:18
}
// 生成的schema结构
const schema = c.format(data)

About

JSON文件或者JavaScript对象转换成JSON-SCHEMA校验规则对象。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published