• 
      

    Use rich output for JSON.

    Review Request #15166 — Created July 10, 2026 and updated

    Information

    RBTools
    master

    Reviewers

    The last piece for rich output is the --json flag. When this flag is
    specified, we already suppress all other output. This change makes it so
    at the very end we pop the suppression handler from the console and then
    print the JSON using highlighting (when appropriate).

    Verified that commands printed nice output when using --json (and that
    things respected --color or *_COLOR envvars).

    Summary ID
    Use rich output for JSON.
    The last piece for rich output is the `--json` flag. When this flag is specified, we already suppress all other output. This change makes it so at the very end we pop the suppression handler from the console and then print the JSON using highlighting (when appropriate). Testing Done: Verified that commands printed nice output when using `--json` (and that things respected `--color` or *_COLOR envvars).
    mlukxtnmsrzyqpqokzskwmylwmrxvuwo
    Checks run (2 succeeded)
    flake8 passed.
    JSHint passed.