Example usage for com.fasterxml.jackson.databind.ser.std DateSerializer instance

List of usage examples for com.fasterxml.jackson.databind.ser.std DateSerializer instance

Introduction

In this page you can find the example usage for com.fasterxml.jackson.databind.ser.std DateSerializer instance.

Prototype

DateSerializer instance

To view the source code for com.fasterxml.jackson.databind.ser.std DateSerializer instance.

Click Source Link

Usage

From source file:com.amazonaws.services.dynamodbv2.streamsadapter.model.RecordObjectMapper.java

public RecordObjectMapper() {
    super();// w w  w . ja v a2s. com
    SimpleModule module = new SimpleModule(MODULE, Version.unknownVersion());

    // Deal with (de)serializing of byte[].
    module.addSerializer(ByteBuffer.class, new ByteBufferSerializer());
    module.addDeserializer(ByteBuffer.class, new ByteBufferDeserializer());

    // Deal with (de)serializing of Date
    module.addSerializer(Date.class, DateSerializer.instance);
    module.addDeserializer(Date.class, new DateDeserializer());

    // Don't serialize things that are null
    this.setSerializationInclusion(JsonInclude.Include.NON_NULL);

    this.addMixInAnnotations(AttributeValue.class, AttributeValueMixIn.class);
    this.addMixInAnnotations(Record.class, RecordMixIn.class);
    this.addMixInAnnotations(StreamRecord.class, StreamRecordMixIn.class);
}