diff --git a/source/upgrade/v3.txt b/source/upgrade/v3.txt index 9a623c89..7a88817a 100644 --- a/source/upgrade/v3.txt +++ b/source/upgrade/v3.txt @@ -111,12 +111,17 @@ Version 3.0 Breaking Changes - By default, the driver serializes ``Decimal128`` and ``decimal`` values as BSON ``Decimal128`` values. In previous versions of the driver, the driver serialized these values as BSON ``string`` values by default. - To serialize a ``decimal`` or ``Decimal128`` value as a string in v3.0, + To serialize a ``decimal`` or ``Decimal128`` value as a string in v3.0, apply the ``[BsonRepresentation(BsonType.String)]`` attribute to the field. To learn more about specifying BSON types during serialization, see the :ref:`Custom Serialization ` section of the POCOs page. +- By default, the driver serializes ``DateTimeOffset`` values as BSON documents. In + previous versions of the driver, the driver serialized these values as BSON arrays by + default. To serialize a ``DateTimeOffset`` value as an array in v3.0, apply the + ``[BsonRepresentation(BsonType.Array)]`` attribute to the field. + - The default JSON output mode is Relaxed Extended JSON, a string format based on the JSON standard that describes BSON documents. Relaxed Extended JSON emphasizes readability and interoperability at the expense of type preservation. @@ -138,4 +143,4 @@ Version 3.0 Breaking Changes var json = document.ToJson(jsonWriterSettings); - The ``MongoClient`` constructor accepts only one ``Credential`` object instead of an - array. \ No newline at end of file + array.