Console utility for pretty JSON output
Project description
Simple python utility for using in shell scripts.
Features
Print colorized JSON
Minimized and formatted output
Output elements by keys and indexes
Check JSON for correctness
Automatically disabling color sequences, when prints to pipeline, file or other non-tty output
Examples
test.json
{
"arr": [
123,
"λάμβδα ラムダ lambda",
[
"1",
"2"
]
],
"test": "test"
}
Colorized indented
printjson test.json
Minimized monochrome
printjson -om test.json
Result:
{"test":"test","arr":[123,"λάμβδα ラムダ lambda",["1","2"]]}
Print third entry of “arr” array, using “__” as delimiter
printjson -k 'arr__2' -d '__' test.json
Result:
[
"1",
"2"
]
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
printjson-1.0.1.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for printjson-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 483ec050c993f42bfdc60482e84e9fb6a2456caf162c329816a8fa862705ccd0 |
|
MD5 | 114504a9d13d0f7f4d7e0650276ec67d |
|
BLAKE2b-256 | b24aaf6b0b575c69fd6a5ae834a698b0a8285a28a2a15afe66762dbdb6a04512 |