File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
fundamentals/serialization Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,6 @@ attributes change the way that the driver serializes each property of
8787your POCO. This section describes some of the common
8888serialization-related attributes.
8989
90-
9190Serialize Read-Only Properties
9291~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9392
@@ -195,6 +194,12 @@ For more information on valid type conversions, see the `{+language+}
195194Conversions Specification
196195<https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/conversions>`__.
197196
197+ .. important:: Serializing NaN and Infinity
198+
199+ If you try to serialize or deserialize a floating-point
200+ ``Infinity`` or ``NaN`` value to an integral representation, the driver throws an
201+ ``OverflowException``.
202+
198203Set Field Order
199204~~~~~~~~~~~~~~~
200205
Original file line number Diff line number Diff line change @@ -144,3 +144,12 @@ Version 3.0 Breaking Changes
144144
145145- The ``MongoClient`` constructor accepts only one ``Credential`` object instead of an
146146 array.
147+
148+ - If you try to serialize or deserialize a floating-point
149+ ``Infinity`` or ``NaN`` value to an integral representation, the driver throws an
150+ ``OverflowException``. To learn more about floating-point ``Infinity`` and ``NaN``
151+ values, see
152+ `Double.NaN, <https://learn.microsoft.com/en-us/dotnet/api/system.double.nan?view=net-8.0#system-double-nan>`__
153+ `Double.PositiveInfinity, <https://learn.microsoft.com/en-us/dotnet/api/system.double.positiveinfinity?view=net-8.0#system-double-positiveinfinity>`__
154+ and `Double.NegativeInfinity. <https://learn.microsoft.com/en-us/dotnet/api/system.double.negativeinfinity?view=net-8.0#system-double-negativeinfinity>`__
155+ on MSDN.
You can’t perform that action at this time.
0 commit comments