After you have installed rustup.
bash
$ cargo install json-generator
```bash $ json-generator -h
json-generator 0.1.0 Timothy Bess tdbgamer@gmail.com Takes in JSON DSL and outputs correctly formatted JSON
USAGE:
json-generator [FLAGS]
FLAGS:
-h, --help Prints help information
-p, --pretty
-V, --version Prints version information
ARGS:
```
bash
$ json-generator -p 'a=b c=d d=e e=f'
{
"a": "b",
"c": "d",
"d": "e",
"e": "f"
}
bash
$ json-generator -p '[a, b, c, d, e, f]'
[
"a",
"b",
"c",
"d",
"e",
"f"
]
bash
$ json-generator -p '[1, 1.1, 1.2e10, -100]'
[
1,
1.1,
12000000000.0,
-100
]