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]: JSON command output format #5499

Open
2 tasks done
p5 opened this issue Aug 22, 2023 · 2 comments
Open
2 tasks done

[Feature request]: JSON command output format #5499

p5 opened this issue Aug 22, 2023 · 2 comments

Comments

@p5
Copy link

p5 commented Aug 22, 2023

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Suggestion

It would be great if the flatpak CLI could format outputs as JSON so that it's easier to parse and work with custom wrappers.

I'm hoping to wrap the Flatpak CLI in my own application but it's not trivial extracting the important bits of information from the command outputs. You end up wrangling with whitespaces, and no matter what you do, it's a nightmare to manage. It would be great if Flatpak supports a --format json flag which outputs JSON (an easy to parse language).

Or if this is already available, could it be added to the -h menu? From the interactions on this issue, it's obvious this does not already exist.

@g2p
Copy link

g2p commented Aug 26, 2023

I'm interested in having it for ps output at least; from grepping the source, list, history, ps, search, documents, remotes, remote-ls all have tabular data (they call handle_column_args) and could be adapted.

Also: permissions, permission-show, repo (users of flatpak_table_printer_new).

@GageHoweTamu
Copy link

Seconding this as I'd also like to use serialized outputs instead of haphazardly trimming whitespace. I'm available to try and implement this if there's any guidance on where to start.

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

No branches or pull requests

3 participants