-
Notifications
You must be signed in to change notification settings - Fork 5k
JsonSourceGenerationOptionsAttribute should provide an option for enabling string enum serialization globally #87195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue Details
Originally posted by @terrajobst in #79311 (comment)
|
Related to #57321. |
namespace System.Text.Json.Serialization;
public partial class JsonSourceGenerationOptionsAttribute
{
public bool UseStringEnumConverter { get; set; } = false;
}
public partial class JsonNumberEnumConverter<TEnum> : JsonConverterFactory
where TEnum : struct, Enum
{
public JsonNumberEnumConverter();
public sealed override bool CanConvert(System.Type typeToConvert);
public sealed override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options);
} |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Originally posted by @terrajobst in #79311 (comment)
API Proposal
API Usage
Related to #81985 which tracks support for compile-time control of
JsonSerializerDefaults.Web
.cc @halter73
The text was updated successfully, but these errors were encountered: