Package org.apache.nifi.c2.serializer
Class C2JacksonSerializer
java.lang.Object
org.apache.nifi.c2.serializer.C2JacksonSerializer
- All Implemented Interfaces:
C2Serializer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate final com.fasterxml.jackson.databind.ObjectMapper -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
objectMapper
private final com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
-
Constructor Details
-
C2JacksonSerializer
public C2JacksonSerializer()
-
-
Method Details
-
serialize
Description copied from interface:C2SerializerHelper to serialise object- Specified by:
serializein interfaceC2Serializer- Type Parameters:
T- the type of the object- Parameters:
object- object to be serialised- Returns:
- the serialised string representation of the parameter object if it was successful empty otherwise
-
deserialize
Description copied from interface:C2SerializerHelper to deserialise an object- Specified by:
deserializein interfaceC2Serializer- Type Parameters:
T- the type of the target object- Parameters:
content- the string representation of the object to be deserialsedvalueType- the class of the target object- Returns:
- the deserialised object if successful empty otherwise
-