Command-line tool to validate and pretty-print JSON(just for the missing options in `json.tool`)
Project description
Pretty JSON
Tool for printing pretty JSON (just for the missing options in json.tool
)
For the issues in Python bug tracker:
- Specifying indent in the json.tool command
- Add an option to json.tool to bypass non-ASCII characters
Installing
Install and update using pip
:
pip install -U prettyjson
Usage Examples
Example 1
echo '{"name": "vimfun", "from": "The Earth"}' | python -m prettyjson
Result:
{
"name": "vimfun",
"from": "The Earth",
}
Example 2
echo '{"name": "vimfun", "from": "The Earth"}' | python -m prettyjson --indent=2
Result:
{
"name": "vimfun",
"from": "The Earth"
}
Example 3
echo '{"name": "王旭林", "from": "The Earth"}' | python -m prettyjson --indent=2 --no-ensure-ascii
Result:
{
"name": "王旭林",
"from": "The Earth"
}
Links
-
Website: https://github.com/vimfun/prettyjson
-
Releases: https://pypi.org/project/prettyjson/
-
Issue tracker: https://github.com/vimfun/prettyjson/issues
-
Test status:
- Linux, Mac: https://travis-ci.org/vimfun/prettyjson
- Windows: https://ci.appveyor.com/project/vimfun/prettyjson
-
Test coverage: https://codecov.io/gh/vimfun/prettyjson
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prettyjson-1.0.3.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for prettyjson-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac0b5246147ce289e8f1c63c0248f9ab361b662e7073ab9e4ab7018e6d725a9e |
|
MD5 | 089eb82b9394bb8b1399db3bfa46948a |
|
BLAKE2b-256 | e3299601c08f7c12a89815edf4daa1e21317443d6ea8bc940aa98476b77bd910 |