Skip to content

Conversation

@theory
Copy link
Contributor

@theory theory commented Sep 7, 2025

Section 2.5.1.1 defines shorthand names with this grammar:

member-name-shorthand = name-first *name-char
name-first          = ALPHA /
                      "_"   /
                      %x80-D7FF /
                         ; skip surrogate code points
                      %xE000-10FFFF
name-char           = name-first / DIGIT

This allows shorthand names that correspond to the JSON literals true, false, and null.

So add tests for this pattern.

Section 2.5.1.1 defines shorthand names with this grammar:

```anbf
member-name-shorthand = name-first *name-char
name-first          = ALPHA /
                      "_"   /
                      %x80-D7FF /
                         ; skip surrogate code points
                      %xE000-10FFFF
name-char           = name-first / DIGIT
```

This allows shorthand names that correspond to the JSON literals `true`,
`false`, and `null`.

So add tests for this pattern.
@taimoorzaeem
Copy link
Contributor

Hi @theory, these tests look good to merge.

I was just wondering, what's the use case for covering these cases? I can't think of any case where an implementation would work fine with $.name but not with $.true. 🤔

@theory
Copy link
Contributor Author

theory commented Sep 7, 2025

Here's one: mine. I had overlooked including bools and null in a switch statement. :-)

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.

LG and passes for me. @gregsdennis any objections?

@f3ath f3ath merged commit 7dad82a into jsonpath-standard:main Sep 10, 2025
2 checks passed
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