Skip to content

feat: add json output format (-o json) - #355

Merged
davidB merged 1 commit into
davidB:masterfrom
ChrisJr404:feat/json-output
Aug 31, 2026
Merged

davidB merged 1 commit into
davidB:masterfrom
ChrisJr404:feat/json-output

Conversation

@ChrisJr404

Copy link
Copy Markdown
Contributor

Adds -o json next to the existing table and csv outputs, for #346.

It emits the same rows as the csv output but as a json array of records, so dashboards and CI checks don't have to re-parse the flat csv. Quantities and percentages come out as numbers (or null when not available), and each record keeps its group-by path so the tree can be rebuilt. utilization/utilization_percentage fields are added when -u is used, same as csv.

Added a couple of unit tests on the value builder and documented it in the README.

Same rows as the csv output but as a json array of records, so consumers
like dashboards and CI checks don't have to re-parse the flat csv. Values
and percentages are numbers (or null when not available) and each record
keeps its group-by path so the tree can be rebuilt.

Closes davidB#346
@davidB
davidB merged commit 3cb65d6 into davidB:master Aug 31, 2026
3 checks passed
@davidB

davidB commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants