Class ByteArrayToJsonNodeConverter
java.lang.Object
org.axonframework.serialization.jackson3.ByteArrayToJsonNodeConverter
- All Implemented Interfaces:
ContentTypeConverter<byte[],tools.jackson.databind.JsonNode>
public class ByteArrayToJsonNodeConverter
extends Object
implements ContentTypeConverter<byte[],tools.jackson.databind.JsonNode>
ContentTypeConverter implementation for Jackson 3 that converts byte[] containing UTF8 encoded
JSON string to a Jackson JsonNode.
- Since:
- 4.13.0
- Author:
- Allard Buijze, John Hendrikx
-
Constructor Summary
ConstructorsConstructorDescriptionByteArrayToJsonNodeConverter(tools.jackson.databind.ObjectMapper objectMapper) Initialize the Converter, using givenobjectMapperto parse the binary contents -
Method Summary
-
Constructor Details
-
ByteArrayToJsonNodeConverter
public ByteArrayToJsonNodeConverter(tools.jackson.databind.ObjectMapper objectMapper) Initialize the Converter, using givenobjectMapperto parse the binary contents- Parameters:
objectMapper- the Jackson ObjectMapper to parse the byte array with
-
-
Method Details
-
expectedSourceType
Description copied from interface:ContentTypeConverterThe expected type of input data.- Specified by:
expectedSourceTypein interfaceContentTypeConverter<byte[],tools.jackson.databind.JsonNode> - Returns:
- the expected data format in IntermediateRepresentation
-
targetType
Description copied from interface:ContentTypeConverterThe returned type of IntermediateRepresentation- Specified by:
targetTypein interfaceContentTypeConverter<byte[],tools.jackson.databind.JsonNode> - Returns:
- the output data format in IntermediateRepresentation
-
convert
public tools.jackson.databind.JsonNode convert(byte[] original) Description copied from interface:ContentTypeConverterConverts the given object into another. Typically, these values are contained by aSerializedObjectinstance.- Specified by:
convertin interfaceContentTypeConverter<byte[],tools.jackson.databind.JsonNode> - Parameters:
original- the value to convert- Returns:
- the converted value
-