Skip to content

Commit 543e9c2

Browse files
authored
DOCSP-44005 - DateTimeOffset (#245)
1 parent c33b875 commit 543e9c2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

source/upgrade/v3.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,17 @@ Version 3.0 Breaking Changes
111111
- By default, the driver serializes ``Decimal128`` and ``decimal`` values as BSON
112112
``Decimal128`` values. In previous versions of the driver, the driver serialized these
113113
values as BSON ``string`` values by default.
114-
To serialize a ``decimal`` or ``Decimal128`` value as a string in v3.0,
114+
To serialize a ``decimal`` or ``Decimal128`` value as a string in v3.0,
115115
apply the ``[BsonRepresentation(BsonType.String)]`` attribute to the field.
116116

117117
To learn more about specifying BSON types during serialization, see the
118118
:ref:`Custom Serialization <csharp-custom-serialization>` section of the POCOs page.
119119

120+
- By default, the driver serializes ``DateTimeOffset`` values as BSON documents. In
121+
previous versions of the driver, the driver serialized these values as BSON arrays by
122+
default. To serialize a ``DateTimeOffset`` value as an array in v3.0, apply the
123+
``[BsonRepresentation(BsonType.Array)]`` attribute to the field.
124+
120125
- The default JSON output mode is Relaxed Extended JSON, a string format based on the
121126
JSON standard that describes BSON documents. Relaxed Extended JSON emphasizes
122127
readability and interoperability at the expense of type preservation.
@@ -138,4 +143,4 @@ Version 3.0 Breaking Changes
138143
var json = document.ToJson(jsonWriterSettings);
139144

140145
- The ``MongoClient`` constructor accepts only one ``Credential`` object instead of an
141-
array.
146+
array.

0 commit comments

Comments
 (0)