-
-
Notifications
You must be signed in to change notification settings - Fork 118
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/1 behaviour and path expression question #81
Comments
This is due to the difference of checking the equality of path target and input value. jq checks by the pointer addresses but gojq does not. I know this problem since I implemented here but not sure there's workaround in Go, and I stopped wondering for solution because I believe there's no query which should run successfully with jq but not with gojq. |
I see, thanks for explaining. Yes i don't think it will cause any issues for me neither. I only noticed the difference while reading the code and testing different expressions. To support doing it similar to jq I guess gojq would have to wrap all values in some struct that includes some unique value? A bit unrelated thing I thought about while reading the code: would replace |
It needs to wrap like that but should be recursive. But it causes various problems against |
Ok! Thanks for the info. Closing. |
Hello, I noticed this difference from jq while trying to understand the path tracking code in gojq
Don't think i understand what the
reflect.DeepEqual
checks are doing, ex: https://github.com/itchyny/gojq/blob/main/execute.go#L226and https://github.com/itchyny/gojq/blob/main/execute.go#L303 i guess it's to make sure the expression was a "path" expression and did not include other things?
The text was updated successfully, but these errors were encountered: