Class MorphiaMapCodec

  • All Implemented Interfaces:
    org.bson.codecs.Codec<Map<String,​Object>>, org.bson.codecs.Decoder<Map<String,​Object>>, org.bson.codecs.Encoder<Map<String,​Object>>, org.bson.codecs.OverridableUuidRepresentationCodec<Map<String,​Object>>

    public class MorphiaMapCodec
    extends org.bson.codecs.MapCodec
    Maps Map subtypes to/from the database. This is mostly a pass-through to the driver codec except for the encoding, non-String types are converted to Strings if possible.
    Since:
    2.1.7
    Developer note.
    This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
    • Method Detail

      • encode

        public void encode​(org.bson.BsonWriter writer,
                           Map map,
                           org.bson.codecs.EncoderContext encoderContext)
        Specified by:
        encode in interface org.bson.codecs.Encoder<Map<String,​Object>>
        Overrides:
        encode in class org.bson.codecs.MapCodec