-
For example, {
"min": "0.1.0"
"max": "1.0.0"
"ext": true
} I wish to generate badge like Is there something like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
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. |
Beta Was this translation helpful? Give feedback.
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.