A simple json schema generator based on json resource with auto validation tools
Project description
=
JSON Schema Genarotor
=
# About
It is a json schema genarator from any json source.
# Example
Since you have a json file with the above structure":
{
"item_1": "string_value_1",
"item_2": 123,
"item_3": [1, 2, 3],
"item_4": true,
"item_5": null,
"item_6": { "key": "value"},
"item_7": {
"item_7.1": "string_value_1",
"item_7.2": 123,
"item_7.3": [1, 2, 3],
"item_7.4": true,
"item_7.5": null,
"item_7.6": { "key": "value"}
}
}
It should generate a json schema as":
{
"$schema": "http://json-schema.org/draft-03/schema",
"id": "#",
"required": true,
"type": "object",
"properties": {
"item_1": {
"id": "item_1",
"required": true,
"type": "string"
},
"item_2": {
"id": "item_2",
"required": true,
"type": "number"
},
"item_3": {
"id": "item_3",
"required": true,
"type": "array" ,
"items": {
"id": "0",
"required": true,
"type": "number"
}
},
"item_4": {
"id": "item_4",
"required": true,
"type": "boolean"
},
"item_5": {
"id": "item_5",
"required": true,
"type": "null"
},
"item_6": {
"id": "item_6",
"required": true,
"type": "object" ,
"properties": {
"key": {
"id": "key",
"required": true,
"type": "string"
}
}
},
"item_7": {
"id": "item_7",
"required": true,
"type": "object" ,
"properties": {
"item_7.1": {
"id": "item_7.1",
"required": true,
"type": "string"
},
"item_7.2": {
"id": "item_7.2",
"required": true,
"type": "number"
},
"item_7.3": {
"id": "item_7.3",
"required": true,
"type": "array" ,
"items": {
"id": "0",
"required": true,
"type": "number"
}
},
"item_7.4": {
"id": "item_7.4",
"required": true,
"type": "boolean"
},
"item_7.5": {
"id": "item_7.5",
"required": true,
"type": "null"
},
"item_7.6": {
"id": "item_7.6",
"required": true,
"type": "object" ,
"properties": {
"key": {
"id": "key",
"required": true,
"type": "string"
}
}
}
}
}
}
}
JSON Schema Genarotor
=
# About
It is a json schema genarator from any json source.
# Example
Since you have a json file with the above structure":
{
"item_1": "string_value_1",
"item_2": 123,
"item_3": [1, 2, 3],
"item_4": true,
"item_5": null,
"item_6": { "key": "value"},
"item_7": {
"item_7.1": "string_value_1",
"item_7.2": 123,
"item_7.3": [1, 2, 3],
"item_7.4": true,
"item_7.5": null,
"item_7.6": { "key": "value"}
}
}
It should generate a json schema as":
{
"$schema": "http://json-schema.org/draft-03/schema",
"id": "#",
"required": true,
"type": "object",
"properties": {
"item_1": {
"id": "item_1",
"required": true,
"type": "string"
},
"item_2": {
"id": "item_2",
"required": true,
"type": "number"
},
"item_3": {
"id": "item_3",
"required": true,
"type": "array" ,
"items": {
"id": "0",
"required": true,
"type": "number"
}
},
"item_4": {
"id": "item_4",
"required": true,
"type": "boolean"
},
"item_5": {
"id": "item_5",
"required": true,
"type": "null"
},
"item_6": {
"id": "item_6",
"required": true,
"type": "object" ,
"properties": {
"key": {
"id": "key",
"required": true,
"type": "string"
}
}
},
"item_7": {
"id": "item_7",
"required": true,
"type": "object" ,
"properties": {
"item_7.1": {
"id": "item_7.1",
"required": true,
"type": "string"
},
"item_7.2": {
"id": "item_7.2",
"required": true,
"type": "number"
},
"item_7.3": {
"id": "item_7.3",
"required": true,
"type": "array" ,
"items": {
"id": "0",
"required": true,
"type": "number"
}
},
"item_7.4": {
"id": "item_7.4",
"required": true,
"type": "boolean"
},
"item_7.5": {
"id": "item_7.5",
"required": true,
"type": "null"
},
"item_7.6": {
"id": "item_7.6",
"required": true,
"type": "object" ,
"properties": {
"key": {
"id": "key",
"required": true,
"type": "string"
}
}
}
}
}
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for json_schema_generator-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5facc9e1cd370c7b231909ab4886161963ba455d619149d5721262c4aef4e7e |
|
MD5 | e837ea1f1cbd8738e1dc204b5aa034d8 |
|
BLAKE2b-256 | 5d16e9c38cc847f85d302ecceb8684a9bb07e508ae657d9b49641a39641b9040 |