@@ -111,12 +111,17 @@ Version 3.0 Breaking Changes
111
111
- By default, the driver serializes ``Decimal128`` and ``decimal`` values as BSON
112
112
``Decimal128`` values. In previous versions of the driver, the driver serialized these
113
113
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,
115
115
apply the ``[BsonRepresentation(BsonType.String)]`` attribute to the field.
116
116
117
117
To learn more about specifying BSON types during serialization, see the
118
118
:ref:`Custom Serialization <csharp-custom-serialization>` section of the POCOs page.
119
119
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
+
120
125
- The default JSON output mode is Relaxed Extended JSON, a string format based on the
121
126
JSON standard that describes BSON documents. Relaxed Extended JSON emphasizes
122
127
readability and interoperability at the expense of type preservation.
@@ -138,4 +143,4 @@ Version 3.0 Breaking Changes
138
143
var json = document.ToJson(jsonWriterSettings);
139
144
140
145
- The ``MongoClient`` constructor accepts only one ``Credential`` object instead of an
141
- array.
146
+ array.
0 commit comments