Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a JsonSerializerOptions.TryGetTypeInfo method. #84411

Merged

Conversation

eiriktsarpalis
Copy link
Member

Fix #81269.

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@eiriktsarpalis eiriktsarpalis requested review from layomia and krwq and removed request for layomia April 6, 2023 10:57
@ghost
Copy link

ghost commented Apr 6, 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

Fix #81269.

Author: eiriktsarpalis
Assignees: eiriktsarpalis
Labels:

area-System.Text.Json, new-api-needs-documentation

Milestone: 8.0.0

@eiriktsarpalis eiriktsarpalis added the breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. label Apr 6, 2023
@ghost ghost added the needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet label Apr 6, 2023
@ghost
Copy link

ghost commented Apr 6, 2023

Added needs-breaking-change-doc-created label because this PR has the breaking-change label.

When you commit this breaking change:

  1. Create and link to this PR and the issue a matching issue in the dotnet/docs repo using the breaking change documentation template, then remove this needs-breaking-change-doc-created label.
  2. Ask a committer to mail the .NET Breaking Change Notification DL.

Tagging @dotnet/compat for awareness of the breaking change.

@eiriktsarpalis eiriktsarpalis added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Apr 6, 2023
@eiriktsarpalis
Copy link
Member Author

Let's hold off from merging this until aspnetcore can react to the changes.

@eiriktsarpalis eiriktsarpalis removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Apr 12, 2023
@eiriktsarpalis eiriktsarpalis changed the title Mark the return type of the JsonSerializer.GetTypeInfo method as nullable. Add a JsonSerializerOptions.TryGetTypeInfo method. Apr 12, 2023
@eiriktsarpalis eiriktsarpalis removed breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. needs-breaking-change-doc-created Breaking changes need an issue opened with https://github.com/dotnet/docs/issues/new?template=dotnet labels Apr 12, 2023
@eiriktsarpalis
Copy link
Member Author

Per #81269 (comment) I've updated the PR so that it introduces a new TryGetTypeInfo method instead.

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eiriktsarpalis eiriktsarpalis merged commit 0b08111 into dotnet:main Apr 12, 2023
@eiriktsarpalis eiriktsarpalis deleted the feature/gettypeinfo-nullability branch April 12, 2023 15:06
@ghost ghost locked as resolved and limited conversation to collaborators May 12, 2023
@eiriktsarpalis eiriktsarpalis added the size-reduction Issues impacting final app size primary for size sensitive workloads label May 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.Json new-api-needs-documentation size-reduction Issues impacting final app size primary for size sensitive workloads
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the return type of JsonSerializerOptions.GetTypeInfo nullable.
4 participants