Skip to content
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

Enum Support #543

Open
1 of 2 tasks
IvanJosipovic opened this issue Sep 25, 2024 · 0 comments
Open
1 of 2 tasks

Enum Support #543

IvanJosipovic opened this issue Sep 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@IvanJosipovic
Copy link
Owner

IvanJosipovic commented Sep 25, 2024

Currently, the library is not able to support generating Enums due to serializer limitations with Values like "" or null:

public enum EnumMemberedEnum
{
    No = 0,

    [System.Runtime.Serialization.EnumMember(Value = "goodbye")]
    [System.Text.Json.Serialization.JsonStringEnumMemberName("goodbye")]
    Hello = 1,

    [System.Runtime.Serialization.EnumMember(Value = "")]
    [System.Text.Json.Serialization.JsonStringEnumMemberName("")]
    EmptyValue = 2,

    [System.Runtime.Serialization.EnumMember()]
    [System.Text.Json.Serialization.JsonStringEnumMemberName(null)]
    NullValue = 3
}
@IvanJosipovic IvanJosipovic added the enhancement New feature or request label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant