Class LocalDateAsDocumentCodec

  • All Implemented Interfaces:
    Codec<LocalDate>, Decoder<LocalDate>, Encoder<LocalDate>

    public final class LocalDateAsDocumentCodec
    extends Object
    implements Codec<LocalDate>

    Encodes and decodes LocalDate values to and from BSON Document, such as { year: 2018, month: 1, day: 2 }.

    The values are stored using the following structure:

    • year (a non-null Int32);
    • month (a non-null Int32);
    • day (a non-null Int32).

    This type is immutable.