Handle nested w/o top-level array in Jackson2JsonTokenizer

Issue: SPR-15803
This commit is contained in:
Rossen Stoyanchev
2017-07-21 13:43:38 +02:00
parent bd0de7086e
commit 14ccb38523
2 changed files with 9 additions and 4 deletions

View File

@@ -152,8 +152,8 @@ class Jackson2Tokenizer implements Function<DataBuffer, Flux<TokenBuffer>> {
}
private boolean isTopLevelArrayToken(JsonToken token) {
return (token == JsonToken.START_ARRAY && this.arrayDepth == 1) ||
(token == JsonToken.END_ARRAY && this.arrayDepth == 0);
return this.objectDepth == 0 && ((token == JsonToken.START_ARRAY && this.arrayDepth == 1) ||
(token == JsonToken.END_ARRAY && this.arrayDepth == 0));
}
public void endOfInput() {