Skip to content

Commit af55816

Browse files
committed
Fixes
1 parent fd25260 commit af55816

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

source/data-formats/bson.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Overview
1616
--------
1717

1818
In this guide, you can learn how to create BSON documents, read BSON from a file,
19-
and write BSON to a file using {+driver-short+}.
19+
and write BSON to a file by using {+driver-short+}.
2020

2121
**BSON**, or Binary JSON, is the data format that MongoDB uses to organize
2222
and store data. This data format includes all JSON data structure types and
@@ -43,7 +43,10 @@ Create a BSON Document
4343
----------------------
4444

4545
You can create a BSON document by using the same notation you use to create a
46-
dictionary in {+language+}. The following example creates a BSON document that
46+
dictionary in {+language+}. {+driver-short+} automatically converts {+language+} dictionaries
47+
into BSON documents when inserting them into a collection.
48+
49+
The following example creates a BSON document that
4750
represents the preceding sample BSON document:
4851

4952
.. code-block:: python
@@ -111,8 +114,8 @@ The following example reads the sample BSON document from ``file.bson``:
111114

112115
with open('file.bson', 'rb') as file:
113116
data = file.read()
114-
doc = BSON(data).decode()
115-
print(doc)
117+
document = BSON(data).decode()
118+
print(document)
116119

117120
.. output::
118121
:visible: false

0 commit comments

Comments
 (0)