Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Have a more consise format #2

Open
olibre opened this issue Oct 30, 2019 · 1 comment
Open

Feature request: Have a more consise format #2

olibre opened this issue Oct 30, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@olibre
Copy link

olibre commented Oct 30, 2019

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
                ]
            ]
        }
    }
}
@clarketm clarketm added the enhancement New feature or request label Nov 1, 2019
@clarketm clarketm self-assigned this Nov 1, 2019
@clarketm
Copy link
Owner

clarketm commented Nov 1, 2019

@olibre
Thanks for the feature request and links! I agree that offering some sort of option to enable concise output would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants