Package com.arangodb.serde.jsonb
Class JsonbSerde
java.lang.Object
com.arangodb.serde.jsonb.JsonbSerde
- All Implemented Interfaces:
ArangoSerde
User data serde based on Jakarta JSON Binding (JSON-B).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> T
deserialize
(byte[] content, Class<T> type) Deserializes the content and binds it to the target data type.byte[]
Serializes the object into the target data type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.arangodb.serde.ArangoSerde
deserialize
-
Constructor Details
-
JsonbSerde
public JsonbSerde() -
JsonbSerde
public JsonbSerde(jakarta.json.bind.JsonbConfig config)
-
-
Method Details
-
serialize
Description copied from interface:ArangoSerde
Serializes the object into the target data type. For data typeContentType.JSON
, the serialized JSON string must be encoded into a byte array using the UTF-8 charset.- Specified by:
serialize
in interfaceArangoSerde
- Parameters:
value
- object to serialize- Returns:
- serialized byte array
-
deserialize
Description copied from interface:ArangoSerde
Deserializes the content and binds it to the target data type. For data typeContentType.JSON
, the byte array is the JSON string encoded using the UTF-8 charset.- Specified by:
deserialize
in interfaceArangoSerde
- Parameters:
content
- byte array to deserializetype
- class of target data type- Returns:
- deserialized object
-