Wondering what’s next for npm?Check out our public roadmap! »

json_prettify

2.0.4 • Public • Published

json_prettify

npm version Gitlab pipeline status (branch) codecov License node Greenkeeper badge

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.json or --out file.json write output to file
  • -s <number> or --spaces <number> number of spaces for indentation
  • --help help text

Install

npm i json_prettify

DownloadsWeekly Downloads

2

Version

2.0.4

License

MIT

Unpacked Size

31.4 kB

Total Files

27

Last publish

Collaborators

  • avatar