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

Single quotes don't work for strings within a JSONPath #1

Closed
tkuhlman opened this issue Mar 2, 2018 · 3 comments
Closed

Single quotes don't work for strings within a JSONPath #1

tkuhlman opened this issue Mar 2, 2018 · 3 comments

Comments

@tkuhlman
Copy link

tkuhlman commented Mar 2, 2018

When using this library I noticed that single quotes do not work within a JSONPath, specifically I was evaluating a path like $.data.attributes[?(@.name=='title')].value which fails but changing to double quotes around title like $.data.attributes[?(@.name=="title")].value works fine. I'm not sure if the JSONPath spec addresses quoting at all but the evaluator at http://jsonpath.com/ handles the single quotes fine.

@kairichard
Copy link

Thanks for reporting the issue - we have a look at the spec and fix it accordingly. //cc @paessler-jekeller

@generikvault
Copy link
Collaborator

jsonpath has no formal specification and the (script) language jsonpath is used in is also part of jsonpath. http://jsonpath.com/ uses js as script language so " and ' works fine. But yes, it would be nice to have them.

@generikvault
Copy link
Collaborator

I've wrote a gval language extension for single Quotes.
Just include it to the language and singlequotes will be parsed.

github.com/generikvault/gvalstrings

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

3 participants