Skip to content

Commit

Permalink
v1.1.2 - update README documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed Dec 8, 2018
1 parent 2d1b76f commit 3a15f82
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,36 @@ optional arguments:
```

### Script

Pretty print JSON from a **file** using the `pprintjson` CLI.

```bash
$ pprintjson "./path/to/file.json"
```

Pretty print JSON from a **string** using the `pprintjson` CLI.

```bash
$ pprintjson -s '{ "a": 1, "b": "string", "c": true }'
```

Pretty print JSON from a **string** with an *indent* of **1**.

```bash
$ pprintjson -s '{ "a": 1, "b": "string", "c": true }' -i 1
```

Pretty print JSON from a **string** and save *output* to a file **output.json**.

```bash
$ pprintjson -s '{ "a": 1, "b": "string", "c": true }' -o ./output.json
```

### Module

Pretty print JSON from a **dict** using the `pprintjson` module.

```python

# 1. import the "pprintjson" function.
Expand Down
2 changes: 1 addition & 1 deletion pprintjson/pprintjson.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pygments.formatters import TerminalFormatter
from pygments.lexers import JsonLexer

__VERSION__ = "1.1.1"
__VERSION__ = "1.1.2"


def pprintjson(
Expand Down

0 comments on commit 3a15f82

Please sign in to comment.