Skip to content

Conversation

@madhunzv
Copy link

@madhunzv madhunzv commented Dec 12, 2025

Summary
introduce a new --output structured to render machine-readable JSON with API/Kind metadata, resource existence state, and per-field change records (path + field) built from JSON Pointer tokens
structured output was added as a separate format (rather than altering the existing json output) to avoid breaking changes.
Note: this change set was implemented with assistance from an LLM.

@madhunzv
Copy link
Author

madhunzv commented Jan 2, 2026

Hi @yxxhero Any thoughts on this PR for the structured output mode? Would you prefer using the existing JSON mode instead for the proposed change? Happy to address any questions or feedback and refine the implementation further.

@yxxhero
Copy link
Collaborator

yxxhero commented Jan 2, 2026

@madhunzv what's the difference? do you think which is better?

@madhunzv
Copy link
Author

madhunzv commented Jan 2, 2026

The current JSON output reports high-level metadata and the change type (add / remove / replace) at the resource level.
The proposed structured output goes a step further by including which specific fields changed within each resource, making it more useful for programmatic consumption and detailed analysis.

I don’t think one is inherently better than the other, the structured format essentially extends what the JSON output already provides. I chose to introduce it as a separate output mode to avoid changing the existing JSON format and any potentially breaking consumers that rely on it.

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