static JsonObject toGson(BsonDocument bson) throws IOException {
    return TypeAdapters.JSON_ELEMENT.read(asGsonReader(bson)).getAsJsonObject();
  }
Util methods to convert to/from bson/gson types.
mongo/test/org/immutables/mongo/bson4gson/Jsons.java