A CLI tool to create a schema from a JSON file.
This tool is written in Rust, so you'll need to install the Rust toolchain to build it.
bash
cargo install schermz
bash
schermz -f <path to json file>
sample.json
json
[
{
"name": "John Doe",
"title": "",
"age": 43,
"address": {
"street": "10 Downing Street",
"city": "London"
},
"phones": ["+44 1234567", "+44 2345678", { "mobile": "+44 3456789" }]
},
{
"name": "Jane Doe",
"title": "Dr.",
"age": "66",
"address": null,
"phones": null
}
]
```bash schermz -f ./sample.json
{ "address": { "types": [ "NULL", { "city": { "types": [ "STRING" ] }, "street": { "types": [ "STRING" ] } } ] }, "age": { "types": [ "NUMBER", "STRING" ] }, "name": { "types": [ "STRING" ] }, "phones": { "types": [ { "ARRAY": [ "STRING", { "mobile": { "types": [ "STRING" ] } } ] }, "NULL" ] }, "title": { "types": [ "EMPTY_STRING", "STRING" ] } } ```