vmware-labs / yaml-jsonpath

JSONPath implementation for the gopkg.in/yaml.v3 node API
Other
49 stars 12 forks source link

Reconsider non-scalar comparisons #31

Closed glyn closed 4 years ago

glyn commented 4 years ago

For example, running the selector:

$[?(@[*] > 3)]

against the document:

[[1,2],[3,4],[5,6]]

produces the result consisting of a single entry:

[5, 6]

Some implementations, such as Proposal A, fail to parse non-scalar comparisons.

glyn commented 4 years ago

See https://github.com/vmware-labs/yaml-jsonpath/issues/3#issuecomment-648236076 for a bit of theory about this. Keeping this behaviour for now unless and until a standard says otherwise.