[PoC] Add --json flag to cli commands#3249
Draft
joaopapereira wants to merge 1 commit intocloudfoundry:mainfrom
Draft
[PoC] Add --json flag to cli commands#3249joaopapereira wants to merge 1 commit intocloudfoundry:mainfrom
joaopapereira wants to merge 1 commit intocloudfoundry:mainfrom
Conversation
Signed-off-by: João Pereira <joao.pereira@broadcom.com>
a9954d8 to
9446280
Compare
a-b
approved these changes
Oct 11, 2024
Member
a-b
left a comment
There was a problem hiding this comment.
While it is debatable whether JSON belongs to UI, this is a good proof of concept.
Member
|
I haven't reviewed this PR in detail, but a couple quick thoughts:
|
Contributor
Author
That was my first attempt but even when you look at the apps command you can see that the output is split into 3 different calls to the UI Writer, which makes it complicated to abstract out.
I do not have a strong opinion about that, are we planning on adding TOML or YAML support, or are we just covering our basis here? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
This change adds the
--jsonflags to the commandsapps,app, andget-health-checkcommands as a PoC for us to understand how complicated this would be.