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 --normalise Normalise all files in the given set
-i --ignore Ignore paths if they contain only placeholder values
-t --tabs Use tabs instead of default 2 spaces for JSON indentation
-v --version Shows the installed version of your json-sort-cli
-h --help Shows (similar to this) help

Normalise

$ jsoncomb --normalise "index.json"
$ jsoncomb -n "data/**/index.json" -i "data/defaults.json"

Changelog

See it in the monorepo opens in a new tab, on GitHub.

Contributing

To report bugs or request features or assistance, raise an issue on GitHub opens in a new tab.

Any code contributions welcome! All Pull Requests will be dealt promptly.

Licence

MIT opens in a new tab

Copyright © 2010–2021 Roy Revelt and other contributors

Related packages:

📦 json-comb-core 7.0.1
The inner core of json-comb
📦 json-variables 11.0.1
Resolves custom-marked, cross-referenced paths in parsed JSON
📦 json-sort-cli 2.0.1
Command line app to deep sort JSON files, retains package.json special key order