Breaking change for key-value pair serialization#21050
Merged
gewarren merged 4 commits intodotnet:masterfrom Oct 13, 2020
Merged
Breaking change for key-value pair serialization#21050gewarren merged 4 commits intodotnet:masterfrom
gewarren merged 4 commits intodotnet:masterfrom
Conversation
gewarren
commented
Oct 12, 2020
includes/core-changes/serialization/5.0/options-honored-when-serializing-key-value-pairs.md
Outdated
Show resolved
Hide resolved
layomia
reviewed
Oct 13, 2020
docs/core/compatibility/3.1-5.0.md
Outdated
|
|
||
| ## Serialization | ||
|
|
||
| - [PropertyNamingPolicy is honored when serializing and deserializing key-value pairs](#propertynamingpolicy-is-honored-when-serializing-and-deserializing-key-value-pairs) |
Contributor
There was a problem hiding this comment.
Suggested change
| - [PropertyNamingPolicy is honored when serializing and deserializing key-value pairs](#propertynamingpolicy-is-honored-when-serializing-and-deserializing-key-value-pairs) | |
| - [PropertyNamingPolicy, PropertyNameCaseInsenstive, and Encoder options are honored when serializing and deserializing key-value pairs](#propertynamingpolicy-is-honored-when-serializing-and-deserializing-key-value-pairs) |
|
|
||
| | Breaking change | Introduced version | | ||
| | - | - | | ||
| | [PropertyNamingPolicy is honored when serializing and deserializing key-value pairs](#propertynamingpolicy-is-honored-when-serializing-and-deserializing-key-value-pairs) | 5.0 | |
Contributor
There was a problem hiding this comment.
Suggested change
| | [PropertyNamingPolicy is honored when serializing and deserializing key-value pairs](#propertynamingpolicy-is-honored-when-serializing-and-deserializing-key-value-pairs) | 5.0 | | |
| | [PropertyNamingPolicy, PropertyNameCaseInsenstive, and Encoder options are honored when serializing and deserializing key-value pairs](#propertynamingpolicy-is-honored-when-serializing-and-deserializing-key-value-pairs) | 5.0 | |
includes/core-changes/serialization/5.0/options-honored-when-serializing-key-value-pairs.md
Outdated
Show resolved
Hide resolved
includes/core-changes/serialization/5.0/options-honored-when-serializing-key-value-pairs.md
Outdated
Show resolved
Hide resolved
includes/core-changes/serialization/5.0/options-honored-when-serializing-key-value-pairs.md
Outdated
Show resolved
Hide resolved
includes/core-changes/serialization/5.0/options-honored-when-serializing-key-value-pairs.md
Outdated
Show resolved
Hide resolved
includes/core-changes/serialization/5.0/options-honored-when-serializing-key-value-pairs.md
Outdated
Show resolved
Hide resolved
includes/core-changes/serialization/5.0/options-honored-when-serializing-key-value-pairs.md
Outdated
Show resolved
Hide resolved
layomia
approved these changes
Oct 13, 2020
| ##### Serialization | ||
|
|
||
| In .NET Core 3.x versions and in the 4.7.x versions of the [System.Text.Json NuGet package](https://www.nuget.org/packages/System.Text.Json), the properties of <xref:System.Collections.Generic.KeyValuePair%602> instances are always serialized as "Key" and "Value" exactly, regardless of any <xref:System.Text.Json.JsonSerializerOptions.PropertyNamingPolicy?displayProperty=nameWithType> and <xref:System.Text.Json.JsonSerializerOptions.Encoder?displayProperty=nameWithType> options. The following code example shows how the <xref:System.Collections.Generic.KeyValuePair%602.Key> and <xref:System.Collections.Generic.KeyValuePair%602.Value> properties are *not* camel-cased after serialization. | ||
| In .NET Core 3.x versions and in the 4.6.0-4.7.2 versions versions of the [System.Text.Json NuGet package](https://www.nuget.org/packages/System.Text.Json), the properties of <xref:System.Collections.Generic.KeyValuePair%602> instances are always serialized as "Key" and "Value" exactly, regardless of any <xref:System.Text.Json.JsonSerializerOptions.PropertyNamingPolicy?displayProperty=nameWithType> and <xref:System.Text.Json.JsonSerializerOptions.Encoder?displayProperty=nameWithType> options. The following code example shows how the <xref:System.Collections.Generic.KeyValuePair%602.Key> and <xref:System.Collections.Generic.KeyValuePair%602.Value> properties are *not* camel-cased after serialization, even though the specified property-naming policy dictates so. |
gewarren
commented
Oct 13, 2020
includes/core-changes/serialization/5.0/options-honored-when-serializing-key-value-pairs.md
Outdated
Show resolved
Hide resolved
…erializing-key-value-pairs.md
BillWagner
added a commit
that referenced
this pull request
Oct 14, 2020
* Respond to feedback for deserialization constructors (#21051) * Fixes #20949. (#21052) * Add f1-keyword for `class` used as generic type constraint (#21037) * Add f1-keyword for `class` used as generic type constraint * Add structconstraint * Update CS0267 message and simplify example (#21047) * Update CS0267 message and simplify example * Update ms.date * Added a link (#21058) * Fixes #20958. (#21054) * fix the source path for retired C# 7.x content (#21059) The "whats-new" folder was missing. * Removing redundant pipe character (#20931) * Update single-file.md (#20925) update ReadyToRun link now that we have the docs for it. * Remove statement about TLS 1.3 for .NET Core 3.0 (#20922) I think, TLS 1.3 won't be supported by .NET Core 3.0 since it's out of support and the implementation is coming with .NET 5, as stated in [Transport Layer Security (TLS) best practices with the .NET Framework](#4675 (comment)). This info should be removed, so we have no misleading information out there... 😉 * SslStream/NegotiateStream breaking change (#20979) * Add workload and app model to glossary (#21046) Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> * Breaking change for key-value pair serialization (#21050) * Update .NET Standard overview for .NET 5 (#20955) Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> * Update get-started-vscode.md (#21072) http to https after verifying link Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Co-authored-by: Jon Senchyna <TheSench@users.noreply.github.com> Co-authored-by: Youssef Victor <31348972+Youssef1313@users.noreply.github.com> Co-authored-by: David Pine <david.pine@microsoft.com> Co-authored-by: Bill Wagner <wiwagn@microsoft.com> Co-authored-by: William Whitwell Bailey <45574209+willwhitwellbailey@users.noreply.github.com> Co-authored-by: Lakshan Fernando <lakshanf@hotmail.com> Co-authored-by: kapsiR <kapsiR@users.noreply.github.com> Co-authored-by: Tom Dykstra <tdykstra@microsoft.com> Co-authored-by: icyfire0573 <40814526+icyfire0573@users.noreply.github.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #20898.
Preview link.