Skip to content

Enum Support #543

@IvanJosipovic

Description

@IvanJosipovic

Currently, the library is not able to support generating Enums 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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions