Handle nested w/o top-level array in Jackson2JsonTokenizer
Issue: SPR-15803
This commit is contained in:
@@ -57,7 +57,7 @@ public class Jackson2TokenizerTests extends AbstractDataBufferAllocatingTestCase
|
||||
}
|
||||
|
||||
@Test
|
||||
public void noTokenizeArrayElements() {
|
||||
public void doNotTokenizeArrayElements() {
|
||||
this.tokenizer = new Jackson2Tokenizer(this.jsonParser, false);
|
||||
|
||||
testTokenize(
|
||||
@@ -116,7 +116,7 @@ public class Jackson2TokenizerTests extends AbstractDataBufferAllocatingTestCase
|
||||
asList("{\"foo\": \"bar\"}",
|
||||
"{\"foo\": \"baz\"}"));
|
||||
|
||||
// SPR-15803
|
||||
// SPR-15803: nested array
|
||||
testTokenize(
|
||||
singletonList("[" +
|
||||
"{\"id\":\"0\",\"start\":[-999999999,1,1],\"end\":[999999999,12,31]}," +
|
||||
@@ -129,6 +129,11 @@ public class Jackson2TokenizerTests extends AbstractDataBufferAllocatingTestCase
|
||||
"{\"id\":\"2\",\"start\":[-999999999,1,1],\"end\":[999999999,12,31]}")
|
||||
);
|
||||
|
||||
// SPR-15803: nested array, no top-level array
|
||||
testTokenize(
|
||||
singletonList("{\"speakerIds\":[\"tastapod\"],\"language\":\"ENGLISH\"}"),
|
||||
singletonList("{\"speakerIds\":[\"tastapod\"],\"language\":\"ENGLISH\"}"));
|
||||
|
||||
testTokenize(
|
||||
asList("[{\"foo\": \"foofoo\", \"bar\"",
|
||||
": \"barbar\"},{\"foo\": \"foofoofoo\", \"bar\": \"barbarbar\"}]"),
|
||||
|
||||
Reference in New Issue
Block a user