Skip to content

Port fixes from jsonpath-rfc9535 - #145

Merged
jg-rp merged 2 commits into
mainfrom
some-fixes
Dec 2, 2026
Merged

jg-rp merged 2 commits into
mainfrom
some-fixes

Conversation

@jg-rp

@jg-rp jg-rp commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

When strict compliance with RFC 9535 is enforced:

  • Fix detection of function expressions with a ValueType result that are not part of a comparison expression. Previously we allowed ValueType functions without a comparison if they were part of a prefix expression. Now we raise a JSONPathTypeError, as required by RFC 9535.

  • Fix a typo in the regular expression used for scanning shorthand names. Previously we were rejecting some names containing characters in the Unicode BMP.

  • Fix parsing of some int and float literal corner cases involving leading zeros.

  • Add JSONPathOverflowError, which is now raised when extremely large integer literals can't be parsed. Previously a standard OverflowError was raised in such cases.

  • Fix handling of JSONPath expressions with many segments (hundreds). Previously we would get a RecursionError at evaluation time from deeply nested generator functions. Now we materialize internal node lists every 100 segments to avoid the recursion error.

  • Fix handling of logical-not-op. We now raise a JSONPathSyntaxError when ! is not followed by a parenthesized expression, filter query or function expression.

@jg-rp
jg-rp marked this pull request as ready for review December 2, 2026 07:36
@jg-rp
jg-rp merged commit c0ac8fc into main Dec 2, 2026
34 checks passed
@jg-rp
jg-rp deleted the some-fixes branch December 2, 2026 07:36
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

Successfully merging this pull request may close these issues.

1 participant