Skip to content

Metadata should be embedded in the structures being deserialized #1

Description

@unleashed

Currently the metadata attribute argument will be used in a composite structure <Struct>AndMetadata that flattens the struct for deserialization purposes next to the metadata. This was initially done to try to free the developer from having to manually specify metadata fields and their usage only for deserialization.

However, this scheme makes it impossible to access this metadata by passing in just a <Struct>. The workaround is to set the metadata argument to an empty type and manually specify the metadata inside the struct.

Doing this in the macro would have the metadata next to the other fields and would also simplify the deserialization by removing the need for the composite structure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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