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

Fix JSON Extract on structs. #698

Closed
wants to merge 2 commits into from

Conversation

MathiasGr
Copy link
Contributor

It was broken because the jsonpath library fails whenever the given object is not a slice or a map. Structs must thus be converted to map[string]interface{} JSON representation prior to jsonpath.Lookup being called.

It was broken because the jsonpath library fails whenever the given object is not a slice or a map. Structs must thus be converted to map[string]interface{} JSON representation prior to jsonpath.Lookup being called.
@zachmu
Copy link
Member

zachmu commented Jan 1, 2022

Looks like this breaks a bunch of tests, although the change looks fine. Let us know if you need help debugging.

@zachmu
Copy link
Member

zachmu commented Jan 31, 2022

@jennifersp can you evaluate this to see if the change is good, and then fix the tests if so? (and close this out if not)

@jennifersp
Copy link
Contributor

Was not able to push commit to this PR, so created PR fixes failing tests for this PR

@jennifersp jennifersp closed this Feb 1, 2022
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

Successfully merging this pull request may close these issues.

3 participants