Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback parsing of literals as strings is invalid and inconsistent #90

Open
gibson042 opened this issue Oct 30, 2022 · 0 comments
Open

Comments

@gibson042
Copy link

gibson042 commented Oct 30, 2022

https://jmespath.org/specification.html#grammar and https://jmespath.site/#spec-grammar both require a `…` literal to contain a valid JSON value. tokenize('`[x]`') accordingly throws a SyntaxError, but expressions like tokenize('`x`') and tokenize('`0x`') and tokenize('`Infinity`') incorrectly return a Literal.

If support for "the old syntax of allowing elided quotes in JSON literal expressions" is intentional, then it should be consistent and should also come with a deprecation warning (cf. JEP-12).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant