mxmind / jackson-dataformat-velocypack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ArangoDB-Logo

VelocyPack dataformat for Jackson

Maven Central

This project contains a Jackson extension for reading and writing VelocyPack encoded data.

Maven

To add the dependency to your project with maven, add the following code to your pom.xml:

<dependencies>
  <dependency>
    <groupId>com.arangodb</groupId>
    <artifactId>jackson-dataformat-velocypack</artifactId>
    <version>0.1.4</version>
  </dependency>
</dependencies>

Usage

Just create an instance of VPackMapper simply by:

ObjectMapper mapper = new VPackMapper();

Within ArangoDB Java driver

Usage

Since version 4.5.2 the ArangoDB Java driver allows to use a custom serializer to de-/serialize documents, edges and query results. Just create an instance of VelocyJack and pass it to the driver through ArangoDB.Builder.serializer(ArangoSerialization).

ArangoDB arango = new ArangoDB.Builder().serializer(new VelocyJack()).build();

Configure

VelocyJack velocyJack = new VelocyJack();
velocyJack.configure((mapper) -> {
  // your configuration here
});
ArangoDB arango = new ArangoDB.Builder().serializer(velocyJack).build();

Learn more

About

License:Apache License 2.0


Languages

Language:Java 100.0%