Class JsonNodeToObjectNodeConverter
java.lang.Object
org.axonframework.serialization.json.JsonNodeToObjectNodeConverter
- All Implemented Interfaces:
ContentTypeConverter<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.node.ObjectNode>
public class JsonNodeToObjectNodeConverter
extends Object
implements ContentTypeConverter<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.node.ObjectNode>
A
ContentTypeConverter implementation for Jackson 2 that converts a JsonNode object
into an ObjectNode. Intended to simplify JSON-typed event upcasters, which generally deal
with an ObjectNode as the event.
Will succeed if the JsonNode has a node type of JsonNodeType.OBJECT.
- Since:
- 4.6.0
- Author:
- Steven van Beelen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.node.ObjectNodeconvert(com.fasterxml.jackson.databind.JsonNode original) Converts the given object into another.Class<com.fasterxml.jackson.databind.JsonNode> The expected type of input data.Class<com.fasterxml.jackson.databind.node.ObjectNode> The returned type of IntermediateRepresentation
-
Constructor Details
-
JsonNodeToObjectNodeConverter
public JsonNodeToObjectNodeConverter()
-
-
Method Details
-
expectedSourceType
Description copied from interface:ContentTypeConverterThe expected type of input data.- Specified by:
expectedSourceTypein interfaceContentTypeConverter<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.node.ObjectNode> - Returns:
- the expected data format in IntermediateRepresentation
-
targetType
Description copied from interface:ContentTypeConverterThe returned type of IntermediateRepresentation- Specified by:
targetTypein interfaceContentTypeConverter<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.node.ObjectNode> - Returns:
- the output data format in IntermediateRepresentation
-
convert
public com.fasterxml.jackson.databind.node.ObjectNode convert(com.fasterxml.jackson.databind.JsonNode original) Description copied from interface:ContentTypeConverterConverts the given object into another. Typically, these values are contained by aSerializedObjectinstance.- Specified by:
convertin interfaceContentTypeConverter<com.fasterxml.jackson.databind.JsonNode,com.fasterxml.jackson.databind.node.ObjectNode> - Parameters:
original- the value to convert- Returns:
- the converted value
-