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 Sep 20, 2019
Merged
[release/3.1] Support nullable values in dictionaries#41210layomia merged 1 commit intodotnet:release/3.1from
layomia merged 1 commit intodotnet:release/3.1from
Conversation
* Support nullable values in dictionaries * Address review feedback * Address feedback * Defer dictionary key escaping to writer
ahsonkhan
reviewed
Sep 20, 2019
src/System.Text.Json/src/System/Text/Json/Serialization/JsonPropertyInfoNullable.cs
Show resolved
Hide resolved
ahsonkhan
approved these changes
Sep 20, 2019
Member
|
Customer reported bug. Approved for 3.1 if @ericstj concurs |
ericstj
approved these changes
Sep 20, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 throwingNotSupportedErrorfor genericIDictionary).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.