Skip to content

Commit bc8f4f7

Browse files
committed
DOCSP-13709 update import/export type fidelity warning
1 parent 5950e5a commit bc8f4f7

File tree

5 files changed

+31
-65
lines changed

5 files changed

+31
-65
lines changed

source/includes/fact-type-fidelity-loss-example.rst

Lines changed: 0 additions & 40 deletions
This file was deleted.

source/includes/fact-type-fidelity-loss.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
If you need to preserve all rich :term:`BSON` data types when using
2+
:binary:`~bin.mongoexport` to perform full instance backups, be sure to
3+
specify :manual:`Extended JSON v2.0 (Canonical mode)
4+
</reference/mongodb-extended-json>` to the
5+
:option:`--jsonFormat <mongoexport --jsonFormat>` option to
6+
:binary:`~bin.mongoexport`, in the following fashion:
7+
8+
.. code-block:: javascript
9+
10+
mongoexport --jsonFormat=canonical --collection=<coll> <connection-string>
11+
12+
If :option:`--jsonFormat <mongoexport --jsonFormat>` is unspecified,
13+
:binary:`~bin.mongoexport` outputs data in
14+
:manual:`Extended JSON v2.0 (Relaxed mode)
15+
</reference/mongodb-extended-json>` by default.
16+
17+
:binary:`~bin.mongoimport` will automatically use the :term:`JSON`
18+
format found in the specified target data file when restoring. For
19+
example, it will use :manual:`Extended JSON v2.0 (Canonical mode)
20+
</reference/mongodb-extended-json>` if the target data export file was
21+
created by :binary:`~bin.mongoexport` with ``--jsonFormat=canonical``
22+
specified.

source/mongoexport.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -281,18 +281,7 @@ Behavior
281281
Type Fidelity
282282
~~~~~~~~~~~~~
283283

284-
.. include:: /includes/fact-type-fidelity-loss.rst
285-
286-
:binary:`~bin.mongoexport`:
287-
288-
- Outputs data in :manual:`Extended JSON v2.0 (Relaxed mode)
289-
</reference/mongodb-extended-json>` by default.
290-
291-
- Outputs :manual:`Extended JSON v2.0 (Canonical mode)
292-
</reference/mongodb-extended-json>` if used with
293-
:option:`--jsonFormat <mongoexport --jsonFormat>`.
294-
295-
.. include:: /includes/fact-type-fidelity-loss-example.rst
284+
.. include:: /includes/fact-type-fidelity.rst
296285

297286
FIPS
298287
~~~~

source/mongoimport.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,18 @@ The :binary:`~bin.mongoimport` command has the following form:
8484
Behavior
8585
--------
8686

87-
.. include:: /includes/fact-type-fidelity-loss.rst
87+
Type Fidelity
88+
~~~~~~~~~~~~~
89+
90+
.. include:: /includes/fact-type-fidelity.rst
8891

8992
JSON Format
9093
~~~~~~~~~~~
9194

92-
:binary:`~bin.mongoimport` requires import data to be in
93-
:manual:`Extended JSON v2.0 (Canonical or Relaxed mode)
95+
:binary:`~bin.mongoimport` requires import data to be in either
96+
:manual:`Extended JSON v2.0 (Canonical)
97+
</reference/mongodb-extended-json>` or
98+
:manual:`Extended JSON v2.0 (Relaxed)
9499
</reference/mongodb-extended-json>` format by default. For import data
95100
formatted using Extended JSON v1.0, specify the
96101
:option:`--legacy <mongoimport --legacy>` option.

0 commit comments

Comments
 (0)