Skip to content

Conversation

Marcono1234
Copy link
Contributor

@Marcono1234 Marcono1234 commented Aug 2, 2024

Generally for number literals since JSONPath uses the same syntax as JSON, test values from regular JSON libraries or JSON test suites could be used, for example https://github.com/nst/JSONTestSuite.

So if you have anything else in mind which should be covered, please let me know or feel free to add it yourself.

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.

Looks good. I think it needs a few more cases.

Thanks for the work.

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.

Just some remarks.

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.

Very nice. Revealed a few issues in my implementation.

@gregsdennis gregsdennis merged commit a52c6cc into jsonpath-standard:main Aug 3, 2024
@Marcono1234 Marcono1234 deleted the filter-values branch August 3, 2024 20:40
@He-Pin
Copy link

He-Pin commented Dec 15, 2024

Why treat +1 as an invalidate , I think we can just create it as valid.

@Marcono1234
Copy link
Contributor Author

Why treat +1 as an invalidate , I think we can just create it as valid.

Similar to #90 (comment), because that is how it is defined in the JSONPath standard: A leading + is not allowed for number literals in filter selectors, see https://www.rfc-editor.org/rfc/rfc9535#section-2.3.5.1-10.

(This is also consistent with how JSON numbers are defined in the JSON specification.)

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.

4 participants