[Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-16 Thread Panu Matilainen
The existing --xml output is extremely useful when inspecting oddities but the format is such an eyesore. JSON is much saner to look at. Details in the commits and their messages, but the first commits are just refactoring to make this feasible. The actual feature in the last commit is quite sm

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-16 Thread Michael Schroeder
Seems like it's missing escaping of weird characters like everything < 0x20 (most important`\n`), the `\` and the `"` characters. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2913#issuecomment-1948064464 You are receiving this because

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-16 Thread Panu Matilainen
Oh, indeed. It's just the kind of dumb luck to miss such characters in the test-material you try to reparse for validation :sweat_smile: The newlines in base64Format() was trying to ring some bells but was too busy hacking the rest of it up. -- Reply to this email directly or view it on GitHub

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-16 Thread Panu Matilainen
@pmatilai pushed 1 commit. 34667b308a14992e4fae15a5cc4ce803fddbaa78 fixup! Implement --json query format -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2913/files/cb102a6dd315c1d89da8f38b6fa83b83f4d1..34667b308a14992e4fae15a5cc4ce803fddbaa78 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-16 Thread Panu Matilainen
There you go, that hopefully covers it. Annoyingly this also easily doubles the patch size, as these things always do. Also all this string appending is of course all horribly inefficient, but that can be improved later. -- Reply to this email directly or view it on GitHub: https://github.com

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-16 Thread Michael Schroeder
Your `\r` escaping has a typo: it uses \t instead of \r. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2913#issuecomment-1948362268 You are receiving this because you are subscribed to this thread. Message ID: __

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-16 Thread Panu Matilainen
@pmatilai pushed 1 commit. 479795192525cd1a282d279215deff7fb7f3e492 fixup! Implement --json query format -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2913/files/34667b308a14992e4fae15a5cc4ce803fddbaa78..479795192525cd1a282d279215deff7fb7f3e492 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-16 Thread Michael Schroeder
And shouldn't it be `\\u%04x` instead of `u%04x`? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2913#issuecomment-1948365421 You are receiving this because you are subscribed to this thread. Message ID: _

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-16 Thread Michael Schroeder
Aaand, if `c` is signed, doesn't the < 0x20 break utf8? -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2913#issuecomment-1948368777 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-16 Thread Panu Matilainen
@pmatilai pushed 1 commit. ce82dcaaa71f990054cb22b72553f6dac05ea433 fixup! Implement --json query format -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2913/files/479795192525cd1a282d279215deff7fb7f3e492..ce82dcaaa71f990054cb22b72553f6dac05ea433 You are receiving this

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-18 Thread Panu Matilainen
All your remarks should be covered now, just squashed the fixups in the last push. Oh and thanks for the review! I'm not friends with escapes so I conveniently tend to forget all about them. My main motivation with this one was human consumption more than computer, but of course if we claim it'

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-19 Thread Michael Schroeder
@mlschroe approved this pull request. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2913#pullrequestreview-1887945667 You are receiving this because you are subscribed to this thread. Message ID:

Re: [Rpm-maint] [rpm-software-management/rpm] Implement --json query format (PR #2913)

2024-02-19 Thread Panu Matilainen
Merged #2913 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2913#event-11847031818 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint mail