Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Nov 28, 2023

Backport of #95275 to release/8.0-staging

/cc @eiriktsarpalis

Customer Impact

.NET 8 saw the inclusion of new built-in converters for Memory<T> and ReadOnlyMemory<T> types. These converters will throw an exception on deserialization if given a null JSON value. While this behavior is consistent with other non-nullable struct types, we feel that it should be tweaked for Memory types since they allow implicit conversion from null in .NET code. The change is being backported to .NET 8 since SK adoption of the new built-in converters is blocked because of this issue.

Testing

Added unit tests covering the newly added behavior.

Risk

Low. Adds null handling functionality to the specific built-in converers.

@ghost
Copy link

ghost commented Nov 28, 2023

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #95275 to release/8.0-staging

/cc @eiriktsarpalis

Customer Impact

Testing

Risk

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

@eiriktsarpalis eiriktsarpalis self-assigned this Nov 28, 2023
@eiriktsarpalis eiriktsarpalis modified the milestones: 9.0.0, 8.0.x Nov 28, 2023
@eiriktsarpalis eiriktsarpalis added the Servicing-consider Issue for next servicing release review label Nov 28, 2023
@eiriktsarpalis eiriktsarpalis added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Nov 29, 2023
@eiriktsarpalis
Copy link
Member

Approved over email.

@stephentoub stephentoub merged commit 80c6593 into release/8.0-staging Nov 30, 2023
@stephentoub stephentoub deleted the backport/pr-95275-to-release/8.0-staging branch November 30, 2023 12:52
@akoeplinger akoeplinger modified the milestones: 8.0.x, 8.0.2 Dec 18, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Text.Json Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants