Inflates the top level fields of a BSON document. :param bson_bytes: the BSON bytes that compose this document :param codec_options: An instance of :class:`~bson.codec_options.CodecOptions` whose ``document_class`` must be :class:`RawBSONDocument`.
(
bson_bytes: bytes | memoryview,
codec_options: CodecOptions[RawBSONDocument],
raw_array: bool = False,
)
| 60 | |
| 61 | |
| 62 | def _inflate_bson( |
| 63 | bson_bytes: bytes | memoryview, |
| 64 | codec_options: CodecOptions[RawBSONDocument], |
| 65 | raw_array: bool = False, |
| 66 | ) -> dict[str, Any]: |
| 67 | """Inflates the top level fields of a BSON document. |
| 68 | |
| 69 | :param bson_bytes: the BSON bytes that compose this document |
| 70 | :param codec_options: An instance of |
| 71 | :class:`~bson.codec_options.CodecOptions` whose ``document_class`` |
| 72 | must be :class:`RawBSONDocument`. |
| 73 | """ |
| 74 | return _raw_to_dict(bson_bytes, 4, len(bson_bytes) - 1, codec_options, {}, raw_array=raw_array) |
| 75 | |
| 76 | |
| 77 | class RawBSONDocument(Mapping[str, Any]): |
no test coverage detected