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 details)
Built Distribution
File details
Details for the file prettyjson-1.0.3.tar.gz
.
File metadata
- Download URL: prettyjson-1.0.3.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d56d98b0e74e1aa40bf8eca8e2412c0c87b7114672681e051657f819d826f74 |
|
MD5 | 8e2ec24c3558b4ab7743e80cc4671551 |
|
BLAKE2b-256 | e490f220098f71c6337922f2154de7c78442e7d2cbf1c6f432ca6dd52344120a |
File details
Details for the file prettyjson-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: prettyjson-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac0b5246147ce289e8f1c63c0248f9ab361b662e7073ab9e4ab7018e6d725a9e |
|
MD5 | 089eb82b9394bb8b1399db3bfa46948a |
|
BLAKE2b-256 | e3299601c08f7c12a89815edf4daa1e21317443d6ea8bc940aa98476b77bd910 |