static BsonDocument toBson(JsonObject gson) throws IOException {
    return new BsonDocumentCodec().decode(asBsonReader(gson), DecoderContext.builder().build());
  }
Util methods to convert to/from bson/gson types.
mongo/test/org/immutables/mongo/bson4gson/Jsons.java