Skip to content

🐛 Fix for json path expecting an array #41

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

Merged

Conversation

tjlytle
Copy link
Contributor

@tjlytle tjlytle commented Dec 18, 2020

The recent update to softcreatr/jsonpath introduced a type error if the asserted path returned a hash, as getData() declares array as the return type.

I believe simple assertions worked because the top level object was being cast into an array, and traversing as an array worked, but if any specific path returned an object you'd get a type error due to the new return type declaration.

I believe simple assertions worked because the top level object was being cast into an array, but if any specific path returned an object you'd get a type error.
@martin-helmich
Copy link
Owner

👍 Good catch!

@martin-helmich martin-helmich merged commit 87cdc17 into martin-helmich:master Dec 22, 2020
@tjlytle tjlytle deleted the fix-array-type-compatibility branch December 22, 2020 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants