Skip to content

Serialize: enum members #32

Description

@Inkrementator

Currently, enum members of a composite type are ignored

struct S {
    int i = 0;
    enum foo = "bar";
}
S(5).serialize.writeln() // {"i": 5}

std.traits.FieldNameTuple is used to get the members. Afaik, there is nothing in std.traits to get enum "members". Traits has allMember which would work.

Deserialize could either automatically ignore enums or check them for correctness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions