Fix: skip whitespace in empty array brackets#2596
Open
nathan-duddles wants to merge 1 commit intoajv-validator:masterfrom
Open
Fix: skip whitespace in empty array brackets#2596nathan-duddles wants to merge 1 commit intoajv-validator:masterfrom
nathan-duddles wants to merge 1 commit intoajv-validator:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What issue does this pull request resolve?
Fixes issue #2595
What changes did you make?
Skip whitespace before parsing items within array, because the function that parses array,
parseItems, assumes that if there is whitespace then there exists items to parse.Is there anything that requires more attention while reviewing?
This fix might also be accomplished by adding the skip whitespaces call to
tryParseItems, buttryParseItemsis also used byparseValuesfunction in the same file, and it is not clear ifparseValueswould require the same change (while testing parsing an empty{ }containing white space, theparseJsonwas used instead ofparseValues, so I am not sure if this same bug appears in that path... I don't understand whereparseValuesis actually used).