columnify-json

0.2.4 • Public • Published

columnify-json

A simple, one-dependency JSON formatter that uses whitespace and key (re)ordering to tabulate entries in JSON collections.

Particularly useful for certain kinds of configuration files. Combine with other CLI tools such as jq and grep for maximum effect.

Example

With an input such as:

[{"foo": {"b": 42}}, {"foo": null, "bar": {"a": 17}}]

columnify-json will output the following:

[
  {                     "foo": { "b": 42 } },
  { "bar": { "a": 17 }, "foo": null        }
]

Install

npm install -g columnify-json

Usage

columnify-json /path/to/file.json       // reads from file
echo '{"foo": "bar"}' | columnify-json  // reads from stdin

Package Sidebar

Install

npm i columnify-json

Weekly Downloads

1

Version

0.2.4

License

MIT

Unpacked Size

9.47 kB

Total Files

5

Last publish

Collaborators

  • jacoscaz