meganlkm / pretty-json

make pretty json.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pretty-json

make pretty json.

Documentation: https://github.com/devstuff-io/pretty-json

Installation

pip install pretty-json

Environment Variables

PJSON_OUTPUT_STYLE

Default: monokai

The pygments formatter used to make the json pretty.

Usage

from pretty_json import format_json

# format_json(content, style=OUTPUT_STYLE)
print format_json({'key': 'value'})

See and sample the available styles

python -c "from pretty_json import sample;sample('manni')"

image

All of the installed pygments styles are available:

pip install pygments-solarized
python -c "from pretty_json import sample;sample('solarized')"

image

Authors

See contributors section on GitHub.

About

make pretty json.

License:MIT License


Languages

Language:Python 83.1%Language:Shell 9.4%Language:Makefile 7.4%