Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path Normalization and Casing #518

Open
agrittob opened this issue Mar 12, 2024 · 1 comment
Open

Path Normalization and Casing #518

agrittob opened this issue Mar 12, 2024 · 1 comment

Comments

@agrittob
Copy link

After reading through the spec, all the examples use lower-case for the paths. The spec does say for name selectors that:

Two strings MUST be considered equal if and only if they are identical sequences of Unicode scalar values. In other words, normalization operations MUST NOT be applied to either the member name string M from the JSONPath or the member name strings in the JSON prior to comparison

There does not seem to be any other wording that I can find that covers the handling for casing. Most frameworks for processing JSON allow the ability to configure the serialization/deserializaiton to account for the fact that the data may be cased differently. Given the current JSONPath spec, it seems that the intention is the data will always be in a specific format.

Has any consideration been given to modifying the syntax for the name selector to provide a way to identify it as case-insensitive? I understand that with different implementations there are different performance implications to doing a case-insensitive match but providing a way in the spec to identify a name or path that should be normalized prior to matching would be useful.

@gregsdennis
Copy link
Collaborator

Most frameworks for processing JSON allow the ability to configure the serialization/deserializaiton to account for the fact that the data may be cased differently.

I haven't seen evidence that specifications do this, but rather it's the implementations (operating outside of the related specs) that provide this feature via a setting.

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

No branches or pull requests

2 participants