Mongoc.BSONMethod

Create a BSON document from an arbitrary value. Recursively converts the internal structure of arrays, tuples, structs, etc.

BSONify.as_typeMethod

Convert the given bson document or value to the specified type, recursively converting arrays, tuples, dicts and sub-documents according to the same structure produced by Mongoc.BSON(value::Any)

BSONify.union_typesMethod

Get the types from a union type. https://stackoverflow.com/a/43305886/1133481