Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhammond committed Oct 24, 2024
1 parent cd118df commit a9d7eaa
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@
]
}

It's fast, doesn't mess with the data, and handles invalid JSON (within
reason). For more information see the [project
homepage][jp].
It only adds and removes whitespace, which means that your data won’t get
silently altered. For example, `"\u2603"` won’t get converted to `"☃"`, and
`1.1e1` won’t turn into `11`. The ordering remains the same, and invalid JSON
can be reformatted (within reason). This stuff shouldn’t matter, but people make
mistakes even with a well defined format like JSON, and accurate tools are
important when you’re trying to work out what’s gone wrong.

For more information see the [project homepage][jp].

[jp]: https://paulhammond.org/jp

## Installing

Expand All @@ -25,5 +32,22 @@ Using [Homebrew](http://brew.sh/):
If you don't use Homebrew you can download a [precompiled binary][releases] and
copy the `jp` file inside to somewhere in your path.

[jp]: https://paulhammond.org/jp
[releases]: https://github.com/paulhammond/jp/releases

## Using

To prettify a JSON file:

jp data.json

To prettify from stdin, use - as the filename:

curl -sL https://phmmnd.me/names.json | jp -

To compact a JSON file:

jp --compact data.json

To get help:

jp --help

0 comments on commit a9d7eaa

Please sign in to comment.