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

Allow support for double quotes #63

Closed
nickjer opened this issue Mar 30, 2024 · 1 comment
Closed

Allow support for double quotes #63

nickjer opened this issue Mar 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@nickjer
Copy link

nickjer commented Mar 30, 2024

Currently it seems this code is fairly strict in only supporting single quotes, e.g.,

$.key[?(@.size == 'small')].city

I am wondering if we can loosen this restriction and also allow for double quotes, e.g.,

$.key[?(@.size == "small")].city

The reason for this is when using this syntax in a CLI it is best to wrap this in single quotes as $ is a special character for most shells that gets interpolated when using double quotes. So the following would theoretically work without having to escape single quotes...

my_cli --path '$.key[?(@.size == "small")].city' my_data.json
@besok besok added the enhancement New feature or request label Mar 31, 2024
@besok
Copy link
Owner

besok commented Mar 31, 2024

Fair enough, this sounds logical.
Let's implement it.

I can come back to it in a couple of weeks.

@besok besok mentioned this issue Apr 29, 2024
@besok besok closed this as completed May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants