Skip to content

Enum with [Flags] attribute cannot be serialized. #64

Description

@CertifiedPyro

In Tomlet v5.1.2, enums with [Flags] attributes could be serialized. However, in the current version, it throws an error of "Tomlet: Cannot serialize {o} as an enum of type {type} because the enum type does not declare a name for that value".

I believe the fix is on line 26 of TomlCompositeSerializer. Enum.GetName(type, o) should be replaced with o.ToString().

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