


Replaced as_class, tz_aware, and uuid_subtype options withĬodec_options. Try_compile() to attempt to convert from aīSON regular expression to a Python regular expression object. BSON ¶Ĭhanged in version 3.0: Removed compile_re option: PyMongo now always represents BSON The bytes type is encoded as BSON binary with Objects from re.compile() are both saved as BSON regular expressions.īSON regular expressions are decoded as Regex A BSONĭatetime.datetime instances will be rounded to the nearestĪll datetime.datetime instances are treated as naive. A BSON int32 will always decode to a Python int. The mapping from Python types to BSON types is as follows:Ī Python int will be saved as a BSON int32 or BSON int64 depending Bson – BSON (Binary JSON) Encoding and Decoding ¶īSON (Binary JSON) encoding and decoding.
