Java Code Examples for org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.module.SimpleModule#addSerializer()
The following examples show how to use
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.module.SimpleModule#addSerializer() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SerializedValueSerializerTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Before public void setUp() { objectMapper = new ObjectMapper(); final SimpleModule simpleModule = new SimpleModule(); final JavaType serializedValueWildcardType = objectMapper .getTypeFactory() .constructType(new TypeReference<SerializedValue<?>>() { }); simpleModule.addSerializer(new SerializedValueSerializer(serializedValueWildcardType)); simpleModule.addDeserializer( SerializedValue.class, new SerializedValueDeserializer(serializedValueWildcardType)); objectMapper.registerModule(simpleModule); }
Example 2
Source File: SerializedThrowableSerializerTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Before public void setUp() { final SimpleModule simpleModule = new SimpleModule(); simpleModule.addDeserializer(SerializedThrowable.class, new SerializedThrowableDeserializer()); simpleModule.addSerializer(SerializedThrowable.class, new SerializedThrowableSerializer()); objectMapper = new ObjectMapper(); objectMapper.registerModule(simpleModule); }
Example 3
Source File: SerializedValueSerializerTest.java From flink with Apache License 2.0 | 5 votes |
@Before public void setUp() { objectMapper = new ObjectMapper(); final SimpleModule simpleModule = new SimpleModule(); final JavaType serializedValueWildcardType = objectMapper .getTypeFactory() .constructType(new TypeReference<SerializedValue<?>>() { }); simpleModule.addSerializer(new SerializedValueSerializer(serializedValueWildcardType)); simpleModule.addDeserializer( SerializedValue.class, new SerializedValueDeserializer(serializedValueWildcardType)); objectMapper.registerModule(simpleModule); }
Example 4
Source File: SerializedThrowableSerializerTest.java From flink with Apache License 2.0 | 5 votes |
@Before public void setUp() { final SimpleModule simpleModule = new SimpleModule(); simpleModule.addDeserializer(SerializedThrowable.class, new SerializedThrowableDeserializer()); simpleModule.addSerializer(SerializedThrowable.class, new SerializedThrowableSerializer()); objectMapper = new ObjectMapper(); objectMapper.registerModule(simpleModule); }
Example 5
Source File: SerializedValueSerializerTest.java From flink with Apache License 2.0 | 5 votes |
@Before public void setUp() { objectMapper = new ObjectMapper(); final SimpleModule simpleModule = new SimpleModule(); final JavaType serializedValueWildcardType = objectMapper .getTypeFactory() .constructType(new TypeReference<SerializedValue<?>>() { }); simpleModule.addSerializer(new SerializedValueSerializer(serializedValueWildcardType)); simpleModule.addDeserializer( SerializedValue.class, new SerializedValueDeserializer(serializedValueWildcardType)); objectMapper.registerModule(simpleModule); }
Example 6
Source File: SerializedThrowableSerializerTest.java From flink with Apache License 2.0 | 5 votes |
@Before public void setUp() { final SimpleModule simpleModule = new SimpleModule(); simpleModule.addDeserializer(SerializedThrowable.class, new SerializedThrowableDeserializer()); simpleModule.addSerializer(SerializedThrowable.class, new SerializedThrowableSerializer()); objectMapper = new ObjectMapper(); objectMapper.registerModule(simpleModule); }