@Override
    public void write(JsonWriter out, byte[] value) throws IOException {
      checkArgument(out instanceof BsonWriter, "Should be BsonWriter, not some other JsonWriter");
      checkNotNull(value, "Value could not be null, delegate to #nullSafe() adapter if needed");
      ((BsonWriter) out).unwrap().writeBinaryData(new BsonBinary(value));
    }
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