gistfile1.txt private final static ArangoDB arangoDB = new ArangoDB.Builder().registerModule(new VPackModule() { @Override public void setup(final C context) { context.registerSerializer(LocalDate.class, S_LOCAL_DATE); context.registerSeria
private final static ArangoDB arangoDB = new ArangoDB.Builder().registerModule(new VPackModule() { @Override public> void setup(final C context) { context.registerSerializer(LocalDate.class, S_LOCAL_DATE); context.registerSerializer(LocalDateTime.class, S_LOCAL_DATE_TIME); context.registerDeserializer(LocalDate.class, D_LOCAL_DATE); context.registerDeserializer(LocalDateTime.class, D_LOCAL_DATE_TIME); } public final VPackSerializer S_LOCAL_DATE = (builder, attribute, value, context) -> { builder.add(attribute, DateTimeFormatter.ofPattern("yyyy-MM-dd").format(value)); }; public final VPackSerializer S_LOCAL_DATE_TIME = (builder, attribute, value, context) -> { builder.add(attribute, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(value)); }; public final VPackDeserializer D_LOCAL_DATE = (parent, vpack, context) -> { return LocalDate.parse(vpack.getAsString(), DateTimeFormatter.ofPattern("yyyy-MM-dd")); }; public final VPackDeserializer D_LOCAL_DATE_TIME = (parent, vpack, context) -> { return LocalDateTime.parse(vpack.getAsString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); }; }).build();