Skip to content

Conversation

Marcono1234
Copy link
Contributor

Covers escape sequences which are allowed in some programming languages (e.g. C++ and Python), but which are not valid for JSONPath.

Also adds two test for incomplete \u escapes.

I only added these tests for double quoted selectors, but in theory they also apply to single quoted strings (and filters?). But I am not sure if it is really worth duplicating them.

This is `\LF`, a `\` at the end of the line (used by some programming
languages to wrap a line); it is not `\\n`.
Copy link
Collaborator

@gregsdennis gregsdennis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look good to me. Thanks for submitting them.

My implementation had a bug in that, while it wasn't accepting these, it was throwing an exception instead of merely saying the path is bad. (Wrong error issue.)

Copy link
Collaborator

@f3ath f3ath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass on my implementation.

@gregsdennis gregsdennis merged commit 651dcb8 into jsonpath-standard:main Aug 1, 2024
@Marcono1234 Marcono1234 deleted the invalid-escape-sequences branch August 1, 2024 21:49
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.

3 participants