Skip to content

Commit 1c333e3

Browse files
Docsp 16491 typos fundamentals (#111)
Co-authored-by: Nathan <[email protected]>
1 parent 365fd2f commit 1c333e3

14 files changed

+115
-111
lines changed

source/fundamentals/auth.txt

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Overview
1414
--------
1515

1616
In this guide, we show you how to authenticate with MongoDB using each
17-
**authentication mechanism** available in the MongoDB Community Edition.
17+
**authentication mechanism** available in MongoDB Community Edition.
1818
Authentication mechanisms are processes by which the driver and server
1919
confirm identity and establish trust to ensure security.
2020

@@ -110,15 +110,15 @@ see the :manual:`SCRAM </core/security-scram/>` section of the server manual.
110110

111111
``SCRAM-SHA-256`` is a salted challenge-response authentication mechanism
112112
(SCRAM) that uses your username and password, encrypted with the ``SHA-256``
113-
algorithm to authenticate your user.
113+
algorithm, to authenticate your user.
114114

115115
The following code snippets show how to specify the authentication mechanism,
116116
using the following placeholders:
117117

118-
* ``username`` - your MongoDB username
119-
* ``password`` - your MongoDB user's password
120-
* ``hostname`` - network address of your MongoDB server, accessible by your client
121-
* ``port`` - port number of your MongoDB server
118+
* ``username`` - your MongoDB username.
119+
* ``password`` - your MongoDB user's password.
120+
* ``hostname`` - network address of your MongoDB server, accessible by your client.
121+
* ``port`` - port number of your MongoDB server.
122122
* ``authenticationDb`` - MongoDB database that contains your user's
123123
authentication data. If you omit this parameter, the driver uses the
124124
default value ``admin``.
@@ -161,16 +161,16 @@ mechanism:
161161
3.0, 3.2, 3.4, and 3.6.
162162

163163
``SCRAM-SHA-1`` is a salted challenge-response mechanism (SCRAM) that uses your
164-
username and password, encrypted with the ``SHA-1`` algorithm to authenticate
164+
username and password, encrypted with the ``SHA-1`` algorithm, to authenticate
165165
your user.
166166

167167
The following code snippets show how to specify the authentication mechanism,
168168
using the following placeholders:
169169

170-
* ``username`` - your MongoDB username
171-
* ``password`` - your MongoDB user's password
172-
* ``hostname`` - network address of your MongoDB server, accessible by your client
173-
* ``port`` - port number of your MongoDB server
170+
* ``username`` - your MongoDB username.
171+
* ``password`` - your MongoDB user's password.
172+
* ``hostname`` - network address of your MongoDB server, accessible by your client.
173+
* ``port`` - port number of your MongoDB server.
174174
* ``authenticationDb`` - MongoDB database that contains your user's
175175
authentication data. If you omit this parameter, the driver uses the
176176
default value ``admin``.
@@ -215,7 +215,7 @@ mechanism was deprecated starting in MongoDB 3.6 and is no longer
215215
supported as of MongoDB 4.0.
216216

217217
You cannot specify this method explicitly; refer to the fallback provided
218-
by the :ref:`Default authentication mechanism <default-auth-mechanism>` to
218+
by the :ref:`default authentication mechanism <default-auth-mechanism>` to
219219
connect using ``MONGODB-CR``.
220220

221221
.. _mongodb-aws-auth-mechanism:
@@ -234,14 +234,14 @@ user.
234234
The following code snippets show how to specify the authentication mechanism,
235235
using the following placeholders:
236236

237-
* ``username`` - value of your ``AWS_ACCESS_KEY_ID``
238-
* ``password`` - value your ``AWS_SECRET_ACCESS_KEY``
239-
* ``hostname`` - network address of your MongoDB server, accessible by your client
240-
* ``port`` - port number of your MongoDB server
237+
* ``username`` - value of your ``AWS_ACCESS_KEY_ID``.
238+
* ``password`` - value of your ``AWS_SECRET_ACCESS_KEY``.
239+
* ``hostname`` - network address of your MongoDB server, accessible by your client.
240+
* ``port`` - port number of your MongoDB server.
241241
* ``authenticationDb`` - MongoDB database that contains your user's
242242
authentication data. If you omit this parameter, the driver uses the
243243
default value ``admin``.
244-
* ``awsSessionToken`` - value of your ``AWS_SESSION_TOKEN`` *(optional)*
244+
* ``awsSessionToken`` - value of your ``AWS_SESSION_TOKEN``. *(optional)*
245245

246246
Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential`
247247
tab below for instructions and sample code for specifying this authentication
@@ -329,8 +329,8 @@ the subject name of the client certificate.
329329
The following code snippets show how to specify the authentication mechanism,
330330
using the following placeholders:
331331

332-
* ``hostname`` - network address of your MongoDB server, accessible by your client
333-
* ``port`` - port number of your MongoDB server
332+
* ``hostname`` - network address of your MongoDB server, accessible by your client.
333+
* ``port`` - port number of your MongoDB server.
334334
* ``authenticationDb`` - MongoDB database that contains your user's
335335
authentication data. If you omit this parameter, the driver uses the
336336
default value ``admin``.
@@ -346,7 +346,7 @@ mechanism:
346346

347347
To specify the ``X.509`` authentication mechanism using a connection
348348
string, assign the ``authMechanism`` parameter the value ``MONGODB-X509``
349-
value to the ``authMechanism`` and enable TLS by assigning the ``tls``
349+
and enable TLS by assigning the ``tls``
350350
parameter a ``true`` value. Your code to instantiate a ``MongoClient``
351351
should look something like this:
352352

source/fundamentals/connection.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ parameters of the connection URI to specify the behavior of the client.
249249

250250
* - **maxPoolSize**
251251
- integer
252-
- Specifies the maximum size of the instance connection pool.
252+
- Specifies the maximum size of the connection pool.
253253

254254
* - **waitQueueTimeoutMS**
255255
- integer
@@ -295,7 +295,7 @@ parameters of the connection URI to specify the behavior of the client.
295295
- boolean
296296
- Specifies that the driver should allow invalid hostnames for TLS
297297
connections. Has the same effect as setting
298-
**tlsAllowInvalidHostnames** to true. To configure TLS security
298+
**tlsAllowInvalidHostnames** to ``true``. To configure TLS security
299299
constraints in other ways, use a
300300
:ref:`custom SSLContext <tls-custom-sslContext>`.
301301

@@ -420,12 +420,12 @@ parameters of the connection URI to specify the behavior of the client.
420420
* - **retryWrites**
421421
- boolean
422422
- Specifies that the driver must retry supported write operations
423-
if they fail due to a network error. Defaults to true.
423+
if they fail due to a network error. Defaults to ``true``.
424424

425425
* - **retryReads**
426426
- boolean
427427
- Specifies that the driver must retry supported read operations
428-
if they fail due to a network error. Defaults to true.
428+
if they fail due to a network error. Defaults to ``true``.
429429

430430
* - **uuidRepresentation**
431431
- string

source/fundamentals/connection/jndi.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ Java Naming and Directory Interface (JNDI)
77
:depth: 2
88
:class: singlecol
99

10+
1011
Overview
1112
--------
1213

13-
MongoClientFactory includes a `JNDI
14+
``MongoClientFactory`` includes a `JNDI
1415
<http://docs.oracle.com/javase/8/docs/technotes/guides/jndi/index.html>`__
1516
``ObjectFactory`` implementation that returns ``MongoClient`` instances
1617
based on a :ref:`connection URI <connection-uri>`. Follow the guides
@@ -49,7 +50,7 @@ below to configure your application to connect using a JNDI DataSource.
4950

5051
.. note::
5152

52-
Replace the placeholder connection value URI in the ``property`` tag
53+
Replace the placeholder connection value in the ``property`` tag
5354
with a value that points to your MongoDB installation.
5455

5556
This will make a MongoClient instance accessible via the JNDI name
@@ -61,7 +62,7 @@ below to configure your application to connect using a JNDI DataSource.
6162
1. Copy the ``mongo-java-driver.jar`` jar file into the ``lib`` directory
6263
of your `Tomcat <http://tomcat.apache.org/>`__ installation.
6364

64-
#. In ``context.xml`` of your application, add a resource that references
65+
#. In the ``context.xml`` file of your application, add a resource that references
6566
the ``MongoClientFactory`` class and the :ref:`connection string
6667
<connection-uri>` for the MongoDB cluster:
6768

@@ -77,7 +78,7 @@ below to configure your application to connect using a JNDI DataSource.
7778

7879
.. note::
7980

80-
Replace the placeholder connection value URI in the ``connectionString``
81+
Replace the placeholder URI in the ``connectionString``
8182
attribute with a value that points to your MongoDB installation.
8283

8384
#. In ``web.xml`` of your application, add a reference to the

source/fundamentals/connection/tls.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Disable Hostname Verification
156156
-----------------------------
157157

158158
By default, the driver ensures that the hostname included in the server's
159-
TLS/SSL certificate(s) matches the hostname(s) provided when constructing
159+
TLS/SSL certificates matches the hostnames provided when constructing
160160
a ``MongoClient``. If you need to disable hostname verification for your
161161
application, you can explicitly disable this by setting the
162162
``invalidHostNameAllowed`` property of the builder to ``true`` in the

source/fundamentals/data-formats/codecs.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In this guide, you can learn about **Codecs** and the supporting classes that
2020
handle the encoding and decoding of Java objects to and from BSON data in
2121
MongoDB. The ``Codec`` abstraction allows you to map any Java type to
2222
a corresponding BSON type. You can use this to map your domain objects
23-
directly to and from BSON instead of using an intermediate map-based one such
23+
directly to and from BSON instead of using an intermediate map-based object such
2424
as ``Document`` or ``BsonDocument``.
2525

2626
You can learn how to specify custom encoding and decoding logic using
@@ -164,7 +164,7 @@ the ``fromCodecs()`` method:
164164
In the example above, we assign the ``CodecRegistry`` the following ``Codec``
165165
implementations:
166166

167-
- IntegerCodec, a ``Codec`` that converts Integers and is part of the BSON package.
167+
- ``IntegerCodec``, a ``Codec`` that converts ``Integers`` and is part of the BSON package.
168168
- :ref:`PowerStatusCodec <codecs-powerstatus-codec>`, our sample ``Codec``
169169
that converts certain Java strings to BSON booleans.
170170

@@ -221,7 +221,7 @@ section of this guide.
221221

222222
When working with POJOs, consider using the ``PojoCodecProvider`` to
223223
minimize duplicate code to convert commonly-used data types and customize
224-
the behavior. See our
224+
their behavior. See our
225225
:doc:`POJO Customization guide </fundamentals/data-formats/pojo-customization>`
226226
for more information.
227227

@@ -347,7 +347,7 @@ After defining the conversion logic, we can perform the following:
347347
The following example class contains code that assigns the
348348
``MonolightCodecProvider`` to the ``MongoCollection`` instance by passing it
349349
to the ``withCodecRegistry()`` method. The example class also inserts and
350-
retrieves data using the ``Monolight`` class and associated ``Codecs``:
350+
retrieves data using the ``Monolight`` class and associated codecs:
351351

352352
.. literalinclude:: /includes/fundamentals/code-snippets/MonolightCodecExample.java
353353
:start-after: start class
@@ -369,4 +369,3 @@ see the following API Documentation:
369369
- :java-docs:`MongoClientSettings.getDefaultCodecRegistry() <apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.html#getDefaultCodecRegistry()>`
370370
- :java-docs:`Codec <apidocs/bson/org/bson/codecs/Codec.html>`
371371
- :java-docs:`CodecProvider <apidocs/bson/org/bson/codecs/configuration/CodecProvider.html>`
372-

source/fundamentals/data-formats/document-data-format-bson.txt

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

1818
This guide explains the BSON data format, how MongoDB uses it, and how to
19-
install the BSON library independently of the MongoDB driver.
19+
install the BSON library independently of the MongoDB Java driver.
2020

2121
BSON Data Format
2222
----------------
@@ -36,7 +36,7 @@ MongoDB and BSON
3636
----------------
3737

3838
The MongoDB Java Driver, which uses the BSON library, allows you to work
39-
with BSON data by using one of the object types that implement the
39+
with BSON data by using one of the object types that implements the
4040
:java-docs:`Bson <apidocs/bson/org/bson/conversions/Bson.html>` interface,
4141
including:
4242

@@ -58,12 +58,12 @@ These instructions show you how to add the BSON library as a dependency to
5858
your project. If you added the MongoDB Java driver as a dependency to your
5959
project, you can skip this step since the BSON library is already included
6060
as a required dependency of the driver. For instructions on how to add the
61-
MongoDB driver as a dependency to your project, see the
61+
MongoDB Java driver as a dependency to your project, see the
6262
:ref:`driver installation <add-mongodb-dependency>` section of our Quick Start
6363
guide.
6464

6565
We recommend that you use the `Maven <https://maven.apache.org/>`__ or
66-
`Gradle <https://gradle.org/>`__ build automation tool to manage your project
66+
`Gradle <https://gradle.org/>`__ build automation tool to manage your project's
6767
dependencies. Select from the tabs below to see the dependency declaration
6868
for that tool:
6969

source/fundamentals/data-formats/document-data-format-extended-json.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ store data.
2222

2323
This guide explains the following topics:
2424

25-
- the different MongoDB Extended JSON formats
26-
- how to use the BSON library to convert between Extended JSON and Java objects
27-
- how to create a custom conversion of BSON types
25+
- The different MongoDB Extended JSON formats
26+
- How to use the BSON library to convert between Extended JSON and Java objects
27+
- How to create a custom conversion of BSON types
2828

2929
For more information on the difference between these formats, see our
3030
`article on JSON and BSON <https://www.mongodb.com/json-and-bson>`__.
@@ -38,7 +38,7 @@ and meet specific use cases. The **extended** format, also known as the
3838
**canonical** format, features specific representations for every BSON type
3939
for bidirectional conversion without loss of information. The **Relaxed mode**
4040
format is more concise and closer to ordinary JSON, but does not represent
41-
all the type information such as specific byte size of number fields.
41+
all the type information such as the specific byte size of number fields.
4242

4343
See the table below to see a description of each format:
4444

@@ -60,15 +60,16 @@ See the table below to see a description of each format:
6060

6161
* - **Shell**
6262
- | JSON representation that matches the syntax used in the MongoDB shell.
63-
| This format prioritizes for compatibility with the MongoDB shell which often uses JavaScript functions to represent types.
63+
| This format prioritizes compatibility with the MongoDB shell which often uses JavaScript functions to represent types.
64+
6465

6566
.. _extended_json_example_section:
6667

6768
.. note::
6869

69-
The ``$uuid`` Extended JSON type is parsed from a String to a
70-
``BsonBinary`` object of binary subtype 4. For more information about
71-
``$uuid`` field parsing, see the
70+
The driver parses the ``$uuid`` Extended JSON type from a string to a
71+
``BsonBinary`` object of binary subtype 4. For more information about ``$uuid`` field
72+
parsing, see the
7273
:spec:`special rules for parsing $uuid fields </extended-json.rst#special-rules-for-parsing-uuid-fields>`
7374
section in the extended JSON specification.
7475

@@ -130,7 +131,7 @@ Read Extended JSON
130131
Using the Document Classes
131132
~~~~~~~~~~~~~~~~~~~~~~~~~~
132133

133-
You can read an Extended JSON string into Java document objects by calling
134+
You can read an Extended JSON string into a Java document object by calling
134135
the ``parse()`` static method from either the ``Document`` or ``BsonDocument``
135136
class, depending on which object type you need. This method parses the Extended
136137
JSON string in any of the formats and returns an instance of that class
@@ -162,12 +163,12 @@ Using the BSON Library
162163
~~~~~~~~~~~~~~~~~~~~~~
163164

164165
You can also read an Extended JSON string into Java objects without using
165-
the MongoDB driver's document classes by using the ``JsonReader`` class.
166+
the MongoDB Java driver's document classes by using the ``JsonReader`` class.
166167
This class contains methods to sequentially parse the fields and values
167168
in any format of the Extended JSON string, and returns them as Java objects.
168-
MongoDB driver's document classes also use this class to parse Extended JSON.
169+
The driver's document classes also use this class to parse Extended JSON.
169170

170-
The following code example shows how you can use ``JsonReader`` to convert
171+
The following code example shows how you can use the ``JsonReader`` class to convert
171172
an Extended JSON string into Java objects:
172173

173174
.. code-block:: java
@@ -238,7 +239,7 @@ the BSON library with the ``JsonWriter`` class. To construct an instance
238239
of ``JsonWriter``, pass a subclass of a Java ``Writer`` to specify how
239240
you want to output the Extended JSON. You can optionally pass a ``JsonWriterSettings``
240241
instance to specify options such as the Extended JSON format. By default, the
241-
``JsonWriter`` uses the Relaxed mode format. MongoDB driver's
242+
``JsonWriter`` uses the Relaxed mode format. The MongoDB Java driver's
242243
document classes also use this class to convert BSON to Extended JSON.
243244

244245
The following code example shows how you can use ``JsonWriter`` to create an

source/fundamentals/data-formats/document-data-format-pojo.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ data representation.
2020

2121
In the following sections we show:
2222

23-
- a POJO example
24-
- how to configure the driver to serialize and deserialize the POJO
25-
- sample code to read and write documents to MongoDB using the POJO
23+
- A POJO example
24+
- How to configure the driver to serialize and deserialize POJOs
25+
- Sample code to read and write documents to MongoDB using POJOs
2626

2727
.. _fundamentals-example-pojo:
2828

2929
Example POJO
3030
------------
3131

3232
To follow the steps in this guide, you can create your own class or use the
33-
following sample POJO class which describes characteristics of a flower:
33+
following sample POJO class which describes some characteristics of a flower:
3434

3535
.. code-block:: java
3636

@@ -99,7 +99,7 @@ following sample POJO class which describes characteristics of a flower:
9999
}
100100

101101
If you are creating your own POJO for storing and retrieving data in MongoDB,
102-
make sure to follow the following guidelines:
102+
make sure to follow these guidelines:
103103

104104
- The POJO class should not implement interfaces or extend classes from a
105105
framework.
@@ -119,8 +119,8 @@ To set up the driver to store and retrieve POJOs, we need to specify:
119119
- The ``PojoCodecProvider``, a codec provider that includes
120120
:doc:`Codecs </fundamentals/data-formats/codecs>` that define how to
121121
encode/decode the data between the POJO and MongoDB document, and which
122-
POJO classes or packages that the Codecs should apply to.
123-
- A ``CodecRegistry`` instance that contains the Codecs and other related information.
122+
POJO classes or packages that the codecs should apply to.
123+
- A ``CodecRegistry`` instance that contains the codecs and other related information.
124124
- A ``MongoClient``, ``MongoDatabase``, or ``MongoCollection`` instance
125125
configured to use the ``CodecRegistry``.
126126
- A ``MongoCollection`` instance created with the POJO document class
@@ -192,7 +192,7 @@ Once you have configured the ``MongoCollection`` instance above, you can:
192192
- save an instance of the POJO to the collection
193193
- retrieve instances of the POJO from a query on the collection
194194

195-
The code below shows you how you can insert an instance of ``Flower`` into
195+
The code below shows how you can insert an instance of ``Flower`` into
196196
the collection and then retrieve it as a ``List`` of your POJO class objects:
197197

198198
.. code-block:: java
@@ -238,7 +238,7 @@ Summary
238238
In this guide, we explained how to convert data between BSON and POJO fields
239239
by performing the following:
240240

241-
- Instantiate a ``PojoCodecProvider`` which contains Codecs which define how to
241+
- Instantiate a ``PojoCodecProvider`` which contains codecs which define how to
242242
encode/decode data between BSON and the POJO fields.
243243
- Specify the **automatic** conversion behavior for the ``PojoCodecProvider``
244244
to apply the ``Codecs`` to any class and its properties.

0 commit comments

Comments
 (0)