File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Overview
1616--------
1717
1818In 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
2222and store data. This data format includes all JSON data structure types and
@@ -43,7 +43,10 @@ Create a BSON Document
4343----------------------
4444
4545You 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
4750represents 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
You can’t perform that action at this time.
0 commit comments