We should provide these utility methods so that the user does not have to know about the internals of how the BSON class (and the encode and decode methods therein) in order to use them properly. For example, right now the user must do the following in order to correctly use the existing class to decode some bson bytes:
BSON(bson_data).decode(codec_options)
The new API could just provide a simple method for the user:
decode(bson_data, codec_options)
- causes
-
PYTHON-1930 Pure python BSON decoders don't support memoryviews with offsets
- Closed
- is duplicated by
-
PYTHON-1641 Reduce pure python BSON decoder memory copies
- Closed
- is related to
-
PYTHON-1403 BSON.encode and BSON.decode perform an extra copy by design
- Closed
- related to
-
PYTHON-1696 Stop encouraging the use of BSON.decode as a class method
- Closed