Handle multi-level JSON with objects and arrays #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔀 Pull Request
What does this PR do?
I am using JSONPath with a large and complex JSON file. PHP's json_decode creates a PHP variable that has both arrays and, at lower levels, objects.
I ran into errors creating new JSONPath object. It would be fine with arrays but would return an error when it encountered nested objects. I think this issue is coming up now because of the stricter enforcement of data types in PHP 8.
I made a few minor changes and everything has been working well for the past few months.
Test Plan
The code has been running without error on a busy site since mid-December.
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)