use of org.bson.codecs.Decimal128Codec in project immutables by immutables.
the class BsonModule method defaultRegistry.
private static CodecRegistry defaultRegistry() {
CodecRegistry standard = CodecRegistries.fromProviders(new BsonValueCodecProvider(), new Jsr310CodecProvider());
// avoid codecs for String / Long / Boolean etc. They're already handled by jackson
// choose the ones which need to be natively serialized in non-JSON format (BSON)
CodecRegistry others = CodecRegistries.fromCodecs(new ObjectIdCodec(), new DateCodec(), new UuidCodec(UuidRepresentation.JAVA_LEGACY), new Decimal128Codec(), new PatternCodec(), new BigDecimalCodec(), new ByteArrayCodec());
return CodecRegistries.fromRegistries(standard, others);
}
Aggregations