Mongoc.BSON
— MethodCreate a BSON document from an arbitrary value. Recursively converts the internal structure of arrays, tuples, structs, etc.
BSONify.as_type
— MethodConvert 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_types
— MethodGet the types from a union type. https://stackoverflow.com/a/43305886/1133481