public static ObjectMapper of() {
        if (MAPPER == null) {
            MAPPER = JacksonMapper.ofJson(false).copy();

            final SimpleModule module = new SimpleModule();
            module.addSerializer(Instant.class, new JsonSerializer<>() {
                @Override
                public void serialize(Instant instant, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
                    jsonGenerator.writeString(INSTANT_FORMATTER.format(instant));
                }
            });

            module.addSerializer(ZonedDateTime.class, new JsonSerializer<>() {
                @Override
                public void serialize(ZonedDateTime instant, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
                    jsonGenerator.writeString(ZONED_DATE_TIME_FORMATTER.format(instant));
                }
            });

            MAPPER.registerModule(module);
        }

        return MAPPER;
    }
@Test
    void instant() throws  JsonProcessingException {
        String serialize = JdbcMapper.of().writeValueAsString(LogEntry.builder()
            .timestamp(Instant.parse("2019-10-06T18:27:49.000Z"))
            .build()
        );

        assertThat(serialize, containsString("2019-10-06T18:27:49.000Z"));
    }