jmespath-community / jmespath.spec

JMESPath Specification
6 stars 3 forks source link

Empty quoted string should be allowed #127

Closed gibson042 closed 1 year ago

gibson042 commented 1 year ago

The quoted-string rule currently requires at least one character between the quotation marks ( quoted-string = quote 1*(unescaped-char / escaped-char) quote), but it should not because JSON object members can be named like "". For example, an expression like `{"": "foo"}` | "" should be valid and result in "foo" (as is in fact already the case in the live demo at the top of https://jmespath.site/ ).

springcomp commented 1 year ago

TIL that empty names are indeed valid JSON keys 😲 !