@Override
    public void write(JsonWriter out, Decimal128 value) throws IOException {
      if (value == null) {
        out.nullValue();
      } else if (out instanceof BsonWriter) {
        ((BsonWriter) out).unwrap().writeDecimal128(value);
      } else {
        out.value(value.toString());
      }
    }
Use this adapter (not registered by factory, default Gson adapter is used otherwise) to
delagate marshaling of {@link BigDecimal} to {@link Decimal128} type in mongo.
@return {@code BigDecimal <==> Decimal128} adapter
mongo/src/org/immutables/mongo/types/TypeAdapters.java