Skip to content

feat(uploader): extend JSON selectors - #6193

Merged
pajlada merged 4 commits into
Chatterino:masterfrom
Nerixyz:feat/extend-json-selectors
May 10, 2025
Merged

pajlada merged 4 commits into
Chatterino:masterfrom
Nerixyz:feat/extend-json-selectors

Conversation

@Nerixyz

@Nerixyz Nerixyz commented May 5, 2025

Copy link
Copy Markdown
Contributor

This PR notably adds syntax for querying arrays: https://example.com/{components.1}.png. It doesn't use .[0] because that's harder to parse. It also adds some tests for the parsing.

One difference to before is that now, once the selector reaches a scalar (string/number/boolean/null/undefined), it stops there. Before, it would've continued and evaluated to QJsonValue::Undefined. I don't see a reason to keep this.

When Chatterino is compiled with Qt 6.9+, one can also query a scalar/top-level string like "foo": {.} (makes use of the change above).

Closes #6191.

@pajlada
pajlada enabled auto-merge (squash) May 10, 2025 10:12
@pajlada
pajlada merged commit dd85fb0 into Chatterino:master May 10, 2025
babicekmarek pushed a commit to babicekmarek/streamally-chatterino that referenced this pull request Sep 14, 2026
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

Successfully merging this pull request may close these issues.

Image Uploader: Ability to get a url to an image from an array

2 participants