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.
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
JsonSourceGenerationOptionsAttributeor at least disable generating of theDefaultproperty, so we could provide our own configuration for the default instance.