Skip to content

Commit c0c26cf

Browse files
committed
Docsp-31168 - convertJson behavior (#168)
* wip * table test * table * remove table * list * list * list * list * list (cherry picked from commit b0a50f2)
1 parent eef3141 commit c0c26cf

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

source/configuration/write.txt

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,30 @@ The following options for writing to MongoDB are available:
5252
| **Default:** None
5353

5454
* - ``convertJson``
55-
- | When ``true``, the connector parses the string and converts extended JSON
55+
- | Specifies whether the connector parses the string and converts extended JSON
5656
into BSON.
5757
|
58+
| This setting accepts the following values:
59+
60+
- ``any``: The connector converts all JSON values to BSON.
61+
62+
- ``"{a: 1}"`` becomes ``{a: 1}``.
63+
- ``"[1, 2, 3]"`` becomes ``[1, 2, 3]``.
64+
- ``"true"`` becomes ``true``.
65+
- ``"01234"`` becomes ``1234``.
66+
- ``"{a:b:c}"`` doesn't change.
67+
68+
- ``objectOrArrayOnly``: The connector converts only JSON objects and arrays to
69+
BSON.
70+
71+
- ``"{a: 1}"`` becomes ``{a: 1}``.
72+
- ``"[1, 2, 3]"`` becomes ``[1, 2, 3]``.
73+
- ``"true"`` doesn't change.
74+
- ``"01234"`` doesn't change.
75+
- ``"{a:b:c}"`` doesn't change.
76+
77+
- ``false``: The connector leaves all values as strings.
78+
5879
| **Default:** ``false``
5980

6081
* - ``idFieldList``
@@ -93,12 +114,12 @@ The following options for writing to MongoDB are available:
93114
- | Specifies the type of write operation to perform. You can set
94115
this to one of the following values:
95116

96-
- ``insert``: insert the data.
97-
- ``replace``: replace an existing document that matches the
117+
- ``insert``: Insert the data.
118+
- ``replace``: Replace an existing document that matches the
98119
``idFieldList`` value with the new data. If no match exists, the
99120
value of ``upsertDocument`` indicates whether the connector
100121
inserts a new document.
101-
- ``update``: update an existing document that matches the
122+
- ``update``: Update an existing document that matches the
102123
``idFieldList`` value with the new data. If no match exists, the
103124
value of ``upsertDocument`` indicates whether the connector
104125
inserts a new document.

0 commit comments

Comments
 (0)