It would be handy if JSON parsing facilities in the Java driver existed that used compatible types with the collection/database methods that take BSON parameters.
Notably, parsing a JSON string to pass to the "aggregate" method requires some fiddling to bring the two APIs into alignment. This same condition arises in a few other places wherever something other than BsonDocument is required.
To go from a JSON string to something which can be passed to the aggregate method, for example, requires this rather unwieldy extra step:
BsonArray array = new BsonArrayCodec(MongoClient.getDefaultCodecRegistry()) .decode(new JsonReader(myJsonString), DecoderContext.builder().build());
This ticket is to request the implementation of some intuitive utility methods to bridge the gap. Perhaps directly in the JSON class.