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

Add JSON as Output format for validation #449

Open
JakobDev opened this issue Nov 24, 2022 · 1 comment
Open

Add JSON as Output format for validation #449

JakobDev opened this issue Nov 24, 2022 · 1 comment

Comments

@JakobDev
Copy link
Contributor

appstreamcli validate --format lets you choose between 2 different formats: text and yaml. The YAML format is there to be parsed by other programs. I think it would make sense to add a JSON format as well. It should have exactly the same as the YAML, but as JSON. Many programming languages (e.g. Python which is often used for scripts) today already ship with a JSON parser. If you want to parse YAML with these languages, you need a use a extra library. Even if a language ships without a JSON parser, the tooling for JSON is far better than for YAML, because it is more common. So it would be a good idea to add a JSON format.

@ximion
Copy link
Owner

ximion commented Dec 16, 2022

Would be nice, but I don't intend to add a JSON parser or JSON writer dependency to AppStream, and switching libyaml to JSON mode would be quite a pain to implement reliably.
So this feature isn't super likely to be added any time soon...

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

No branches or pull requests

2 participants