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

Certain keys not allowed #20

Closed
grav opened this issue Mar 19, 2018 · 1 comment
Closed

Certain keys not allowed #20

grav opened this issue Mar 19, 2018 · 1 comment

Comments

@grav
Copy link

grav commented Mar 19, 2018

I know this is kind of a weird edge-case, but thought I'd document it anyway:

$ echo '{"foreach":42}' | jq -c '.foreach'
42

Throws exception in jackson-jq:

ParseException Encountered " "foreach" "foreach "" at line 1, column 2.
Was expecting one of:
    <EOF> 
    "
...
@eiiches
Copy link
Owner

eiiches commented Mar 20, 2018

Thank you for reporting!

Hmm... As keywords are already allowed as keys in object construction (e.g. {foreach: 42}), this shouldn't be hard to fix. Let me look into this again tomorrow.

In the meantime, as you may know, you can always use ."foreach" or .["foreach"] instead :)

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