Installation
Use it
Once installed, call jsoncomb
in the terminal with list of a file or folder paths, using globs, for example:
$ jsoncomb --normalise "index.json"
$ jsoncomb -n "data/**/index.json" -i "data/defaults.json"
$ jsoncomb -n "**/*.json" -t
$ jsoncomb -v
$ jsoncomb --version
$ jsoncomb -h
$ jsoncomb --help
API — flags
short | long | description |
---|---|---|
-n | ||
-n | --normalise | Normalise all files in the given set |
-i | ||
-i | --ignore | Ignore paths if they contain only placeholder values |
-t | ||
-t | --tabs | Use tabs instead of default 2 spaces for JSON indentation |
-v | ||
-v | --version | Shows the installed version of your json-sort-cli |
-h | ||
-h | --help | Shows (similar to this) help |
Normalise
$ jsoncomb --normalise "index.json"
$ jsoncomb -n "data/**/index.json" -i "data/defaults.json"
Normalise process means we add any missing keys, as per extracted schema, so that you would be able to see all available keys in your JSON file, without having to look into documentation etc.