Interface ArangoSerde


  • public interface ArangoSerde
    Contract for serialization/deserialization of user data. Implementations of this interface could be used for customizing serialization/deserialization of user related data using serialization/deserialization libraries like: - serialization libraries for specific JVM languages (e.g. Scala, Kotlin, ...) - serialization libraries already in use in frameworks (e.g. JSON-B, Micronaut Serialization, ...) - high performance serialization libraries (e.g. supporting compile-time data binding code generation) - low-level libraries without support to data binding
    • Method Detail

      • serialize

        byte[] serialize​(Object value)
        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.
        Parameters:
        value - object to serialize
        Returns:
        serialized byte array
      • deserialize

        <T> T deserialize​(byte[] content,
                          Class<T> clazz)
        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.
        Parameters:
        content - byte array to deserialize
        clazz - class of target data type
        Returns:
        deserialized object