fix JsonFraming to accept multiple top-level arrays (#26098) (#26099)

This commit is contained in:
Roman Filonenko 2019-09-13 02:42:22 +02:00 committed by Helena Edelson
parent 4c894d628f
commit 489f7c2288
2 changed files with 27 additions and 4 deletions

View file

@ -116,7 +116,8 @@ import scala.annotation.switch
trimFront += 1
} else if (input == SquareBraceEnd && outsideObject) {
// outer array completed!
pos = -1
pos += 1
trimFront += 1
} else if (input == Comma && outsideObject) {
// do nothing
pos += 1
@ -137,9 +138,7 @@ import scala.annotation.switch
isStartOfEscapeSequence = false
depth -= 1
pos += 1
if (depth == 0) {
completedObject = true
}
if (depth == 0) completedObject = true
} else if (isWhitespace(input) && !inStringExpression) {
pos += 1
if (depth == 0) trimFront += 1