pprintjson
pprintjson copied to clipboard
Feature request: Have a more consise format
Thank you for you sweet JSON printer, I am using and enjoying it. 🤩
But, pprintjson often uses unnecessary room and I request an option to get a more concise display.
You may be inspired from file prettyjson.py described in that SO answer.
Example of a concise representation converted to an unnecessary verbose one:
$ pprintjson -c '
{
"grid": {"port": "COM5"},
"policy": {
"movingaverage": 5,
"hysteresis": 5,
"fan1": {
"name": "CPU",
"signal": "cpu",
"mode": "auto",
"speed": 100,
"curve": [[0, 75], [50, 75], [75, 100]]
}
}
}'
{
"grid": {
"port": "COM5"
},
"policy": {
"movingaverage": 5,
"hysteresis": 5,
"fan1": {
"name": "CPU",
"signal": "cpu",
"mode": "auto",
"speed": 100,
"curve": [
[
0,
75
],
[
50,
75
],
[
75,
100
]
]
}
}
}
@olibre Thanks for the feature request and links! I agree that offering some sort of option to enable concise output would be useful.