json_prettify
Takes javascript objects in any notation and converts them to proper JSON with indendation.
For example:
$ echo "{foo: 'bar',n:3}" | json_prettify
Output:
{
"foo": "bar",
"n": 3
}
Installation
$ npm install -g json_prettify
Usage
$ json_prettify file.json <options>
or
$ cat file.json | json_prettify <options>
Options
-o output.jsonor--out file.jsonwrite output to file-s <number>or--spaces <number>number of spaces for indentation--helphelp text