Class JsonNodeToObjectNodeConverter

java.lang.Object
org.axonframework.serialization.jackson3.JsonNodeToObjectNodeConverter
All Implemented Interfaces:
ContentTypeConverter<tools.jackson.databind.JsonNode,tools.jackson.databind.node.ObjectNode>

public class JsonNodeToObjectNodeConverter extends Object implements ContentTypeConverter<tools.jackson.databind.JsonNode,tools.jackson.databind.node.ObjectNode>
A ContentTypeConverter implementation for Jackson 3 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.13.0
Author:
Steven van Beelen, John Hendrikx
  • Constructor Details

    • JsonNodeToObjectNodeConverter

      public JsonNodeToObjectNodeConverter()
  • Method Details

    • expectedSourceType

      public Class<tools.jackson.databind.JsonNode> expectedSourceType()
      Description copied from interface: ContentTypeConverter
      The expected type of input data.
      Specified by:
      expectedSourceType in interface ContentTypeConverter<tools.jackson.databind.JsonNode,tools.jackson.databind.node.ObjectNode>
      Returns:
      the expected data format in IntermediateRepresentation
    • targetType

      public Class<tools.jackson.databind.node.ObjectNode> targetType()
      Description copied from interface: ContentTypeConverter
      The returned type of IntermediateRepresentation
      Specified by:
      targetType in interface ContentTypeConverter<tools.jackson.databind.JsonNode,tools.jackson.databind.node.ObjectNode>
      Returns:
      the output data format in IntermediateRepresentation
    • convert

      public tools.jackson.databind.node.ObjectNode convert(tools.jackson.databind.JsonNode original)
      Description copied from interface: ContentTypeConverter
      Converts the given object into another. Typically, these values are contained by a SerializedObject instance.
      Specified by:
      convert in interface ContentTypeConverter<tools.jackson.databind.JsonNode,tools.jackson.databind.node.ObjectNode>
      Parameters:
      original - the value to convert
      Returns:
      the converted value