-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
EnumMember is not applied when enum value is a combination of flags. #1016
Comments
We do support enum member but only in .net core. Full framework doesn’t have that functionality. Are you doing this in a .net core 6/7/8 app or full framework 4.x? |
I'm using .NET 8 or later. By the way, is there any reasons that exclude EnumMember support for .NET Framework 4.x? It's explicitly excluded by YamlDotNet/YamlDotNet/Serialization/TypeInspectors/ReflectionTypeInspector.cs Lines 34 to 69 in 7bed5cf
|
Describe the bug
When serialize
enum value combinations
.value is serialized by default enum name.
And the name that is specified by
EnumMember
is not used.To Reproduce
Test Code
Serialize result of System.Text.Json / NewtonsoftJson
When serialize same value with
System.Text.Json
/NewtonsoftJson
enum value is serialized as expected.The text was updated successfully, but these errors were encountered: