-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
old-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
JsonSerializerOptions.AddContext won't make the options read-only anymore (dotnet/runtime#80527) and the following code must be updated to add context to combine with the current one.
| if (options.SerializerOptions.IsReadOnly) | |
| { | |
| options.SerializerOptions = new(options.SerializerOptions); | |
| } | |
| // Combine the current resolver with our internal problem details context | |
| options.SerializerOptions.TypeInfoResolver = JsonTypeInfoResolver.Combine(options.SerializerOptions.TypeInfoResolver!, ProblemDetailsJsonContext.Default); |
Metadata
Metadata
Assignees
Labels
old-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels