[Rpm-maint] [rpm-software-management/rpm] Is there any proper documentation with examples for librpm 6.x? (Discussion #4168)
Panu Matilainen
notifications at github.com
Tue Mar 31 07:41:50 UTC 2026
If JSON is the format you're after then rpm >= 4.20 can do that for you: `rpm -qa --json`
>From the API, that'd be calling `headerFormat(h, "[%{*:json}]", NULL);` on the headers that you want (all in this case I suppose). The caveat is that this outputs all the tags, which might be more than you want. You can use the `:json` formatter on any tag individually too to get the value, eg `%{name:json}`, but then you'll need to format the rest of the JSON by yourself.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/4168#discussioncomment-16391177
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/repo-discussions/4168/comments/16391177 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260331/d645195d/attachment.htm>
More information about the Rpm-maint
mailing list