Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

[release/3.1] Support nullable values in dictionaries#41210

Merged
layomia merged 1 commit intodotnet:release/3.1from
layomia:nullable_3.1
Sep 20, 2019
Merged

[release/3.1] Support nullable values in dictionaries#41210
layomia merged 1 commit intodotnet:release/3.1from
layomia:nullable_3.1

Conversation

@layomia
Copy link
Contributor

@layomia layomia commented Sep 19, 2019

Ports #40991 to 3.1

Description

Prior to this change, we were omitting the contents when serializing dictionaries with nullable values e.g. Dictionary<string, float?> (or throwing NotSupportedError for generic IDictionary).

This change fixes this issue.

Customer Impact

Customers will now be able to serialize dictionaries with nullable values e.g. Dictionary<string, float?>, IDictionary<string, DateTime?>.

Fixes https://github.com/dotnet/corefx/issues/40936 in 3.1.

Regression?

No.

Risk

Low. This PR does not modify already existing features, so the possibility of breaking functionality or introducing regressions is limited. Extensive test cases were added to ensure that this new future works correctly.

* Support nullable values in dictionaries

* Address review feedback

* Address feedback

* Defer dictionary key escaping to writer
@danmoseley
Copy link
Member

Customer reported bug. Approved for 3.1 if @ericstj concurs

@layomia layomia merged commit 6a41536 into dotnet:release/3.1 Sep 20, 2019
@layomia layomia deleted the nullable_3.1 branch September 20, 2019 19:59
@karelz karelz added this to the 3.1 milestone Dec 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants