You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for _, c := range buf {
switch c {
case ' ':
case '\n':
case '\t':
continue
case '[':
return true
default:
break
}
}
This seems innocuous enough, but the break is defined to be a break on the switch statement, not the for loop. This means that calls to isArray will always return true if there's a [anywhere in the JSON document.
The text was updated successfully, but these errors were encountered:
I'll open a pull request. I've also noticed that paths containing array indices aren't completely supported either-- will submit a PR for that as well.
The body of
isArray
is as follows:This seems innocuous enough, but the
break
is defined to be a break on theswitch
statement, not thefor
loop. This means that calls toisArray
will always return true if there's a[
anywhere in the JSON document.The text was updated successfully, but these errors were encountered: