static JsonReader asGsonReader(BsonDocument bson) {
    BasicOutputBuffer output = new BasicOutputBuffer();
    new BsonDocumentCodec().encode(new BsonBinaryWriter(output), bson, EncoderContext.builder().build());
    return new BsonReader(new BsonBinaryReader(ByteBuffer.wrap(output.toByteArray())));
  }
Util methods to convert to/from bson/gson types.
mongo/test/org/immutables/mongo/bson4gson/Jsons.java