use of com.fasterxml.jackson.core.json.UTF8StreamJsonParser in project jackson-core by FasterXML.
the class JsonParserSequenceTest method testSkipChildren.
@Test
public void testSkipChildren() throws IOException {
JsonParser[] jsonParserArray = new JsonParser[3];
IOContext ioContext = new IOContext(new BufferRecycler(), jsonParserArray, true);
byte[] byteArray = new byte[8];
InputStream byteArrayInputStream = new ByteArrayInputStream(byteArray, 0, (byte) 58);
UTF8StreamJsonParser uTF8StreamJsonParser = new UTF8StreamJsonParser(ObjectReadContext.empty(), ioContext, 0, byteArrayInputStream, ByteQuadsCanonicalizer.createRoot(), byteArray, -1, (byte) 9, true);
JsonParserDelegate jsonParserDelegate = new JsonParserDelegate(jsonParserArray[0]);
JsonParserSequence jsonParserSequence = JsonParserSequence.createFlattened(true, uTF8StreamJsonParser, jsonParserDelegate);
JsonParserSequence jsonParserSequenceTwo = (JsonParserSequence) jsonParserSequence.skipChildren();
assertEquals(2, jsonParserSequenceTwo.containedParsersCount());
}
Aggregations