Class JsonbSerde

java.lang.Object
com.arangodb.serde.jsonb.JsonbSerde
All Implemented Interfaces:
ArangoSerde

public class JsonbSerde extends Object implements ArangoSerde
User data serde based on Jakarta JSON Binding (JSON-B).
  • Constructor Details

    • JsonbSerde

      public JsonbSerde()
    • JsonbSerde

      public JsonbSerde(jakarta.json.bind.JsonbConfig config)
  • 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