-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Text.JsonblockingMarks issues that we want to fast track in order to unblock other important workMarks issues that we want to fast track in order to unblock other important workpartner-impactThis issue impacts a partner who needs to be kept updatedThis issue impacts a partner who needs to be kept updatedsource-generatorIndicates an issue with a source generator featureIndicates an issue with a source generator feature
Milestone
Description
EDIT See #57321 (comment) for an API proposal.
Original Proposal
Currently source generator for JSON serialization in `System.Text.Json` creates a static property named `Default` that receives default `JsonSerializerOptions` defined by the source generator. These can be modified by using `JsonSourceGenerationOptionsAttribute`, but several options are missing and cannot be set, e.g. `PropertyNameCaseInsensitive`, `NumberHandling`, `DictionaryKeyPolicy`...
It would be really helpful if these missing options could be added to the JsonSourceGenerationOptionsAttribute or at least disable generating of the Default property, so we could provide our own configuration for the default instance.
Reactions are currently unavailable
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.JsonblockingMarks issues that we want to fast track in order to unblock other important workMarks issues that we want to fast track in order to unblock other important workpartner-impactThis issue impacts a partner who needs to be kept updatedThis issue impacts a partner who needs to be kept updatedsource-generatorIndicates an issue with a source generator featureIndicates an issue with a source generator feature