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 completion condition for get_json_object with wildcard paths but empty input array #2228

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

ttnghia
Copy link
Collaborator

@ttnghia ttnghia commented Jul 16, 2024

In cases when we have wildcard paths ([*]) but the input array corresponding to it is an empty array, the current code does not report as complete after parsing past the end of the array. Instead, it continues parsing the input string indefinitely until the end of the string. Although that does not produce an incorrect output, it is a wrong behavior.

This fixes such behavior, allowing the code to terminate correctly.

@ttnghia ttnghia added the bug Something isn't working label Jul 16, 2024
@ttnghia ttnghia requested a review from res-life July 16, 2024 04:59
@ttnghia ttnghia self-assigned this Jul 16, 2024
@ttnghia ttnghia force-pushed the fix_get_json_object_not_return branch from 9a2bc94 to f9b08dc Compare July 16, 2024 05:01
@ttnghia
Copy link
Collaborator Author

ttnghia commented Jul 16, 2024

build

@ttnghia ttnghia requested a review from thirtiseven July 16, 2024 05:02
Copy link
Collaborator

@thirtiseven thirtiseven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ttnghia ttnghia merged commit b881836 into NVIDIA:branch-24.08 Jul 16, 2024
3 checks passed
@ttnghia ttnghia deleted the fix_get_json_object_not_return branch July 16, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants