Skip to content

feature request: support Enum by Value #2

Open

Description

@sanzoghenzo

Hi there!

First of all, kudos for your great work!

I started to use this library, and my data structure serializes the enums using their values instead of the name.

Are you willing to accept a PR to allow the parsing of the enum both by name or value?

Activity

  1. added a commit that references this issue on Mar 14, 2022
    fee1262
  2. Zaharid commented on Apr 9, 2022

    @Zaharid
    Owner

    I have added a feature to define custom parsers, documented here

    https://validobj.readthedocs.io/en/latest/custom.html

    It should allow to more or less easily implement this kind of logic externally.

  3. sanzoghenzo commented on Apr 9, 2022

    @sanzoghenzo
    Author

    Thanks, I will try that ASAP.

    This is also handy for numpy arrays and pydantic models!

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions