From 6672dda7349c90198b1a4611b640074a389b57c2 Mon Sep 17 00:00:00 2001 From: Mike Woofter <108414937+mongoKart@users.noreply.github.com> Date: Thu, 26 Sep 2024 09:57:44 -0500 Subject: [PATCH 1/4] first draft --- source/upgrade.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/upgrade.txt b/source/upgrade.txt index 5c0c92ac..6e3bbc22 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -102,6 +102,15 @@ Version 3.0 Potential Breaking Change - TLS 1.0 and 1.1 are no longer supported. You must use TLS 1.2 or higher. To learn more about configuring TLS/SSL in the {+driver-short+}, see :ref:``. +- In previous versions of the driver, if a field had the C# data type ``Decimal128`` or + ``decimal``, the driver serialized the value as a BSON ``string`` by default. In + version 3.0, the driver defaults to serializing these values as BSON ``Decimal128`` + values instead. + To serialize a a ``decimal`` or ``Decimal128`` value as a string, + you must apply the ``[BsonRepresentation(BsonType.String)]`` attribute to the field. + + To learn more about serialization, see the :ref:`csharp-serialization` guide. + .. _csharp-breaking-changes-2.28.0: Version 2.28.0 Potential Breaking Change From 1e049e423a220085e3ea03485068235796969536 Mon Sep 17 00:00:00 2001 From: Mike Woofter <108414937+mongoKart@users.noreply.github.com> Date: Thu, 26 Sep 2024 10:04:44 -0500 Subject: [PATCH 2/4] wording fix --- source/upgrade.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index 6e3bbc22..6ffa947b 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -107,7 +107,7 @@ Version 3.0 Potential Breaking Change version 3.0, the driver defaults to serializing these values as BSON ``Decimal128`` values instead. To serialize a a ``decimal`` or ``Decimal128`` value as a string, - you must apply the ``[BsonRepresentation(BsonType.String)]`` attribute to the field. + apply the ``[BsonRepresentation(BsonType.String)]`` attribute to the field. To learn more about serialization, see the :ref:`csharp-serialization` guide. From 945ac4e8a98bb804552d631427ea525009d12742 Mon Sep 17 00:00:00 2001 From: Mike Woofter <108414937+mongoKart@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:13:20 -0500 Subject: [PATCH 3/4] feedback --- source/upgrade.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index 6ffa947b..60772044 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -102,14 +102,15 @@ Version 3.0 Potential Breaking Change - TLS 1.0 and 1.1 are no longer supported. You must use TLS 1.2 or higher. To learn more about configuring TLS/SSL in the {+driver-short+}, see :ref:``. -- In previous versions of the driver, if a field had the C# data type ``Decimal128`` or - ``decimal``, the driver serialized the value as a BSON ``string`` by default. In - version 3.0, the driver defaults to serializing these values as BSON ``Decimal128`` - values instead. - To serialize a a ``decimal`` or ``Decimal128`` value as a string, +- 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, apply the ``[BsonRepresentation(BsonType.String)]`` attribute to the field. - To learn more about serialization, see the :ref:`csharp-serialization` guide. + To learn more about specifying BSON types during serialization, see the + :ref:`Custom Serialization ` section of the POCOs page. .. _csharp-breaking-changes-2.28.0: From 3d85c860d0afe089e9c8a607215778af8865106b Mon Sep 17 00:00:00 2001 From: Mike Woofter <108414937+mongoKart@users.noreply.github.com> Date: Fri, 27 Sep 2024 11:23:58 -0500 Subject: [PATCH 4/4] fix line wrap --- source/upgrade.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index 60772044..89210249 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -103,9 +103,8 @@ Version 3.0 Potential Breaking Change more about configuring TLS/SSL in the {+driver-short+}, see :ref:``. - 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. + ``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, apply the ``[BsonRepresentation(BsonType.String)]`` attribute to the field.