Class JsonNodeToByteArrayConverter

java.lang.Object
org.axonframework.conversion.json.JsonNodeToByteArrayConverter
All Implemented Interfaces:
ContentTypeConverter<com.fasterxml.jackson.databind.JsonNode,byte[]>

public class JsonNodeToByteArrayConverter extends Object implements ContentTypeConverter<com.fasterxml.jackson.databind.JsonNode,byte[]>
A ContentTypeConverter implementation that converts a JsonNode object into a byte[].

The byte[] will contain the UTF8 encoded JSON string.

Since:
2.2.0
Author:
Allard Buijze
  • Constructor Details

    • JsonNodeToByteArrayConverter

      public JsonNodeToByteArrayConverter(@Nonnull com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Initialize the JsonNodeToByteArrayConverter using the given objectMapper to convert the JsonNode into byte[].
      Parameters:
      objectMapper - The object mapper to serialize the JsonNode into
      invalid @code
      {@code byte[].
  • Method Details