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",
"age": 43,
"address": {
"street": "10 Downing Street",
"city": "London"
},
"phones": ["+44 1234567", "+44 2345678", 123456]
},
{
"name": "Jane Doe",
"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,NUMBER)", "NULL" ] } } ```