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.
Currently, enum members of a composite type are ignored
std.traits.FieldNameTupleis used to get the members. Afaik, there is nothing instd.traitsto get enum "members". Traits has allMember which would work.Deserialize could either automatically ignore enums or check them for correctness.