-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Text.Json
Milestone
Description
(Edit by @jozkee: proposed API is in a comment at #30445 (comment))
MVC has a scenario where it needs to start with an existing options instance, modify a single property on a copy of it (the encoder) and perform serialization. In the absence of a copy constructor, we're at risk of missing out on newly added properties to the type.
Proposed API
namespace System.Text.Json
{
public sealed partial class JsonSerializerOptions
{
public JsonSerializerOptions(JsonSerializerOptions source)
{
/* Copy all options from source to a new JsonSerializerOptions instance. */
}
}
}
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Text.Json