Skip to content

Test quoted false positive of incorrect capitalization - #113

Merged
f3ath merged 1 commit into
jsonpath-standard:mainfrom
TamasSzigeti:capitalisation-false-positives
Nov 23, 2025
Merged

f3ath merged 1 commit into
jsonpath-standard:mainfrom
TamasSzigeti:capitalisation-false-positives

Conversation

@TamasSzigeti

Copy link
Copy Markdown
Contributor

This came up in the Symfony implementation, I was told it might be useful upstream too

Comment thread tests/filter.json
{
"a": "True"
},
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would it make sense to add an entry like

{
  "a": true
}

and similar ones to the other tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea, can't hurt. Added.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@f3ath
f3ath merged commit b9d7153 into jsonpath-standard:main Nov 23, 2025
2 checks passed
fabpot added a commit to symfony/symfony that referenced this pull request Nov 29, 2025
…igeti)

This PR was merged into the 7.3 branch.

Discussion
----------

 [JsonPath] Fix throwing on quoted True/False/Null

| Q             | A
| ------------- | ---
| Branch?       | 7.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

Bumped into this when parsing Kubernetes json output where `"True"` is commonly used and JsonPath threw for this valid expression. Making the regex more strict fixes it.

See also [PR for upstream fixtures](jsonpath-standard/jsonpath-compliance-test-suite#113)

Commits
-------

d761e25 Fix JsonPath throwing on quoted True/False/Null
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.

2 participants