Class JacksonSerdeImpl

java.lang.Object
com.arangodb.serde.jackson.internal.JacksonSerdeImpl
All Implemented Interfaces:
ArangoSerde, JacksonSerde

public final class JacksonSerdeImpl extends Object implements JacksonSerde
Not shaded in arangodb-java-driver-shaded.
  • Field Details

  • Constructor Details

    • JacksonSerdeImpl

      public JacksonSerdeImpl(com.fasterxml.jackson.databind.ObjectMapper mapper)
  • Method Details

    • serialize

      public byte[] serialize(Object value)
      Description copied from interface: ArangoSerde
      Serializes the object into the target data type. For data type ContentType.JSON, the serialized JSON string must be encoded into a byte array using the UTF-8 charset.
      Specified by:
      serialize in interface ArangoSerde
      Parameters:
      value - object to serialize
      Returns:
      serialized byte array
    • deserialize

      public <T> T deserialize(byte[] content, Class<T> type)
      Description copied from interface: ArangoSerde
      Deserializes the content and binds it to the target data type. For data type ContentType.JSON, the byte array is the JSON string encoded using the UTF-8 charset.
      Specified by:
      deserialize in interface ArangoSerde
      Parameters:
      content - byte array to deserialize
      type - class of target data type
      Returns:
      deserialized object
    • deserialize

      public <T> T deserialize(byte[] content, Class<T> type, RequestContext ctx)
      Description copied from interface: ArangoSerde
      Deserializes the content and binds it to the target data type. For data type ContentType.JSON, the byte array is the JSON string encoded using the UTF-8 charset.
      Specified by:
      deserialize in interface ArangoSerde
      Parameters:
      content - byte array to deserialize
      type - class of target data type
      ctx - serde context, cannot be null
      Returns:
      deserialized object
    • configure

      public JacksonSerde configure(Consumer<com.fasterxml.jackson.databind.ObjectMapper> configureFunction)
      Description copied from interface: JacksonSerde
      Allows configuring the underlying Jackson ObjectMapper
      Specified by:
      configure in interface JacksonSerde
      Parameters:
      configureFunction - function to configure the Jackson ObjectMapper