| Constructor and Description |
|---|
MapCodec()
Construct a new instance with a default
CodecRegistry |
MapCodec(CodecRegistry registry)
Construct a new instance with the given registry
|
MapCodec(CodecRegistry registry,
BsonTypeClassMap bsonTypeClassMap)
Construct a new instance with the given registry and BSON type class map.
|
MapCodec(CodecRegistry registry,
BsonTypeClassMap bsonTypeClassMap,
Transformer valueTransformer)
Construct a new instance with the given registry and BSON type class map.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
decode(BsonReader reader,
DecoderContext decoderContext)
Decodes a BSON value from the given reader into an instance of the type parameter
T. |
void |
encode(BsonWriter writer,
Map<String,Object> map,
EncoderContext encoderContext)
Encode an instance of the type parameter
T into a BSON value. |
Class<Map<String,Object>> |
getEncoderClass()
Returns the Class instance that this encodes.
|
public MapCodec()
CodecRegistrypublic MapCodec(CodecRegistry registry)
registry - the registrypublic MapCodec(CodecRegistry registry, BsonTypeClassMap bsonTypeClassMap)
registry - the registrybsonTypeClassMap - the BSON type class mappublic MapCodec(CodecRegistry registry, BsonTypeClassMap bsonTypeClassMap, Transformer valueTransformer)
registry - the registrybsonTypeClassMap - the BSON type class mapvalueTransformer - the value transformer to use as a final step when decoding the value of any field in the mappublic void encode(BsonWriter writer, Map<String,Object> map, EncoderContext encoderContext)
EncoderT into a BSON value.public Map<String,Object> decode(BsonReader reader, DecoderContext decoderContext)
DecoderT.public Class<Map<String,Object>> getEncoderClass()
EncodergetEncoderClass in interface Encoder<Map<String,Object>>