-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add JsonEnumMemberNameAttribute. #105032
Add JsonEnumMemberNameAttribute. #105032
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis |
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/TrimmingTests/EnumConverterTest.cs
Show resolved
Hide resolved
src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/EnumTests.fs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise; LGTM.
...System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverterFactory.cs
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Show resolved
Hide resolved
...raries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
Outdated
Show resolved
Hide resolved
…ion/Converters/Value/EnumConverter.cs Co-authored-by: David Cantú <dacantu@microsoft.com>
… validation; add more tests.
I've reworked the parsing implementation and refined the casing semantics and identifier validation logics. The implementation also improves performance substantially as this benchmark shows:
|
Makes the following changes:
char
-backed enum types that are possible in F#.Fix #74385. Pending API review.