Skip to content

Is it possible to use complex JSONPath expression with dynamic badge? Such as string concatenating, ternary expression. #10468

Answered by chris48s
razonyang asked this question in General
Discussion options

You must be logged in to vote

I haven't tried your example, but I suspect the answer is no.

The library we use to evaluate JSONPath expressions is https://www.npmjs.com/package/jsonpath there's some info in the README about the syntax that is compatible. Note there is quite a lot of subtle variation between JSONPath libraries. https://cburgmer.github.io/json-path-comparison/ is the canonical resource for comparing them.

Is that example you posted (with concat and ternary) synthx that is compatible with some JSONPath libraries, or just syntax you wish existed? I had a quick scan of the RFC https://www.rfc-editor.org/rfc/rfc9535 and I'm not convinced that is valid for any implementation.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@razonyang
Comment options

@chris48s
Comment options

Answer selected by razonyang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants