public class DefaultArangoSerialization extends Object implements ArangoSerialization
ArangoSerializer.Options
Constructor and Description |
---|
DefaultArangoSerialization(ArangoSerializer serializer,
ArangoDeserializer deserializer) |
Modifier and Type | Method and Description |
---|---|
<T> T |
deserialize(com.arangodb.velocypack.VPackSlice vpack,
Type type)
Deserialize a given VelocyPack to an instance of a given type
|
com.arangodb.velocypack.VPackSlice |
serialize(Object entity)
Serialize a given Object to VelocyPack
|
com.arangodb.velocypack.VPackSlice |
serialize(Object entity,
ArangoSerializer.Options options)
Serialize a given Object to VelocyPack
|
public DefaultArangoSerialization(ArangoSerializer serializer, ArangoDeserializer deserializer)
public com.arangodb.velocypack.VPackSlice serialize(Object entity) throws ArangoDBException
ArangoSerializer
serialize
in interface ArangoSerializer
entity
- The Object to serialize. If it is from type String, it will be handled as a JSON.ArangoDBException
public com.arangodb.velocypack.VPackSlice serialize(Object entity, ArangoSerializer.Options options) throws ArangoDBException
ArangoSerializer
serialize
in interface ArangoSerializer
entity
- The Object to serialize. If it is from type String, it will be handled as a JSON.options
- Additional optionsArangoDBException
public <T> T deserialize(com.arangodb.velocypack.VPackSlice vpack, Type type) throws ArangoDBException
ArangoDeserializer
deserialize
in interface ArangoDeserializer
vpack
- The VelocyPack to deserializetype
- The target type to deserialize to. Use String for raw JSON.ArangoDBException
Copyright © 2016–2022 ArangoDB GmbH. All rights reserved.