You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JsonSerializerOptions.AddContext<TContext>() method was introduced in .NET 6 as a means to associate JsonSerializerOptions instances with a given JsonSerializerContext type. This method was largely superseded in .NET 7 with the introduction of contract customization and the JsonSerializerOptions.TypeInfoResolver property.
We should obsolete AddContext for the following reasons:
Contrary to what the name suggests, it replaces user configuration instead of appending to it.
Activity
bartonjs commentedon Mar 16, 2023
Looks good as proposed.
Confirm with @terrajobst that System.Text.Json should use SYSLIB codes.
Use Json TypeInfoResolverChain (#47450)