-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
paths(scalars)
bug?
#1163
Comments
Oh, hmm - paths is just getting confused by the output of scalars. Thats unfortunate, but perhaps not a bug. |
This is almost surely a bug. |
Okay, I submitted a PR (#1178) which fixes the issue with EDIT: PR now fixes the problem with |
While we await the incorporation of a fix into "master", here is a stand-alone definition of paths/1 based on @alex-ozdemir's contribution:
This definition is written so that anyone who wants to define conditional_recurse/1 as a top-level filter can easily do so. For reference:
|
Came to report this same issue. I'm surprised it's been sitting for 18 months - is there a reason #1178 can't be accepted? Another workaround may be e.g. |
What a blast from the past. I believe we're just waiting on someone with write access to the repo... |
Hello @nicowilliams, I see you are the most frequent committer, can you recommend the best way to get a PR noticed? |
I'll review this next week. EDIT: Swypo. |
Until this is fixed a workaround is to check if
|
|
@nicowilliams wrote:
All three results are correct. You can verify this e.g. by using gojq. |
@pkoppstein Ah, I'm confused. The issue is a user error, sort of. You want: The issue is that |
Consider this JSON:
The instructions
paths(scalars)
yield just[ [ "size" ] ]
Whereas one might expect it should yield
A bit of poking around makes me think the problem is when
false
is a value in a object.The text was updated successfully, but these errors were encountered: