README
jsonmatter is a JSON formatter tool by stream.
INSTALL
$ npm install jsonmatter -g
USAGE
Node:
const tokenizer = ;const jsonmatter = ; const indent = '\t'; fs ;
cli:
$ cat tmp.json | jsonmatter --indent 4
Vim:
autocmd FileType json setlocal formatprg=jsonmatter
:help gq:help formatprg:help formatexpr
OPTIONS
-i, --indent
default indent is 2
spaces, you can also use ' '
or '\t'
.