@Test public void deserializeSingleItem() { TestPojo expected = new TestPojo(true, Byte.MAX_VALUE, Short.MAX_VALUE, Character.MAX_VALUE, Integer.MIN_VALUE, Long.MAX_VALUE, Float.MAX_VALUE, Double.MAX_VALUE, "foo", new String[] {"bar", "baz"}, null); final StreamingDeserializer<TestPojo> deserializer = serializationProvider.getDeserializer(TestPojo.class); Iterator<TestPojo> pojos = deserializer.deserialize(serializePojo(expected)).iterator(); assertTrue(pojos.hasNext()); assertEquals(expected, pojos.next()); assertFalse(pojos.hasNext()); assertThat("Unexpected data remaining in deserializer", deserializer.hasData(), is(false)); }
@Override public <T> StreamingDeserializer<T> getDeserializer(final Class<T> classToDeSerialize) { return newDeserializer(mapper.readerFor(classToDeSerialize)); }
JacksonSerializationProvider implements SerializationProvider { @Override public <T> StreamingDeserializer<T> getDeserializer(final Class<T> classToDeSerialize) { return newDeserializer(mapper.readerFor(classToDeSerialize)); } }
JacksonSerializationProvider implements SerializationProvider { @Override public <T> StreamingDeserializer<T> getDeserializer(final Class<T> classToDeSerialize) { return newDeserializer(mapper.readerFor(classToDeSerialize)); } JacksonSerializationProvider();  JacksonSerializationProvider(final ObjectMapper mapper); }
JacksonSerializationProvider implements SerializationProvider { @Override public <T> StreamingDeserializer<T> getDeserializer(final Class<T> classToDeSerialize) { return newDeserializer(mapper.readerFor(classToDeSerialize)); } JacksonSerializationProvider();  JacksonSerializationProvider(final ObjectMapper mapper); @Override StreamingSerializer getSerializer(final Class<T> classToSerialize); @Override StreamingSerializer getSerializer(final TypeHolder<T> typeToSerialize); @Override StreamingDeserializer<T> getDeserializer(final Class<T> classToDeSerialize); @Override StreamingDeserializer<T> getDeserializer(final TypeHolder<T> typeToDeserialize); @Override void serialize(final T toSerialize, final Buffer destination); }
JacksonSerializationProvider implements SerializationProvider { @Override public <T> StreamingDeserializer<T> getDeserializer(final Class<T> classToDeSerialize) { return newDeserializer(mapper.readerFor(classToDeSerialize)); } JacksonSerializationProvider();  JacksonSerializationProvider(final ObjectMapper mapper); @Override StreamingSerializer getSerializer(final Class<T> classToSerialize); @Override StreamingSerializer getSerializer(final TypeHolder<T> typeToSerialize); @Override StreamingDeserializer<T> getDeserializer(final Class<T> classToDeSerialize); @Override StreamingDeserializer<T> getDeserializer(final TypeHolder<T> typeToDeserialize); @Override void serialize(final T toSerialize, final Buffer destination);  }