public class C2JacksonSerializer extends Object implements C2Serializer
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
logger |
private com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
| Constructor and Description |
|---|
C2JacksonSerializer() |
| Modifier and Type | Method and Description |
|---|---|
<T> Optional<T> |
deserialize(String content,
Class<T> valueType)
Helper to deserialise an object
|
<T> Optional<String> |
serialize(T object)
Helper to serialise object
|
private static final org.slf4j.Logger logger
private final com.fasterxml.jackson.databind.ObjectMapper objectMapper
public <T> Optional<String> serialize(T object)
C2Serializerserialize in interface C2SerializerT - the type of the objectobject - object to be serialisedpublic <T> Optional<T> deserialize(String content, Class<T> valueType)
C2Serializerdeserialize in interface C2SerializerT - the type of the target objectcontent - the string representation of the object to be deserialsedvalueType - the class of the target objectCopyright © 2022 Apache NiFi Project. All rights reserved.