vmware-labs / yaml-jsonpath

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

Consider whether to support "bald" recursive descent $.. #19

Closed glyn closed 4 years ago

glyn commented 4 years ago

If so, should Proposal A support this?

glyn commented 4 years ago

Although supporting this would make the syntax more uniform, 19 out of 37 implementations (as well as @cburgmer's Proposal A) in the comparison project return "not supported" and 4 fail when executing the query.

So, even though Goessner (JavaScript and PHP) does support $.., It seems that this is unlikely ever to become a consensus.

cburgmer commented 4 years ago

I'm documenting the decision right now:

No consensus, but more specifically would introduce more complexity into grammar without much gain to the user. (We would have to introduce a specific terminating rule for the bald version, to avoid $...name becoming valid.)

glyn commented 4 years ago

Thanks @cburgmer and good point about $...name.