Skip to content

serdeEnumProxy not working inside Variants #36

@WebFreak001

Description

@WebFreak001

See #28 (comment)

@serdeEnumProxy!int
enum MyEnum
{
	off, on
}

struct ServerCapabilities
{
	Variant!(void, bool, MyEnum) v;
}

trying to deserialize JSON {"v":0} results in Unexpected IonTypeCode for Algebraic!(void, bool, MyEnum)

This issue does not occur with Nullable!MyEnum or Variant!(void, MyEnum) because of a special otpimization case for these simple cases (#28)

Right now this is not a high priority issue for me, but documenting it because it could lead to issues in the future and we might want to fix this eventually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions