Closed gregschrock closed 2 years ago
I see your point. Let me look at the best fix.
Logically, you are correct. I don't know what I was thinking with that check. Please try the "has-is-not-zero" branch.
Thanks for the quick turn around! I got a chance to test against those changes and it does now function as I expect.
Great, I'll make a release then.
Released
Addressed by v1.12.13
Description
Zero values are being excluded from an expression's
Get
results. It seems this comes down to this line. However, this will also be the case for a few other code paths. The result is incorrect according to JSONPath.https://github.com/ohler55/ojg/blob/ab7f7e6304d3f9eb098606950d207dede590c6ae/jp/get.go#L1151
I'm wondering if this is intentional or maybe it could be optional somehow. As it stands, the library isn't suitable for a use case it's otherwise perfect for. Thanks for your contribution to the community!
Reproduction
Expected
Actual