Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detailed error on Enum reads in enumeratum-play-json #411

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Jenya95
Copy link

@Jenya95 Jenya95 commented Nov 24, 2024

The PR extends integration with play-json by providing possibility to print detailed error messages when deserialization of the enum value fails.

More details at #409

I implemented the logic and tests, but I am not sure what is the correct way to configure it. I did it via new trait PlayDetailedErrorJsonEnum, but not sure whether it is the best option since a few traits with different reads strategies already present (PlayInsensitiveJsonEnum, PlayLowercaseJsonEnum, PlayUppercaseJsonEnum) and it would look bad if I would add corresponding (PlayDetailedErrorInsensitiveJsonEnum, PlayDetailedErrorLowercaseJsonEnum, PlayDetailedErrorUppercaseJsonEnum).

Will it make sense to configure it as system property? Like (-Denumeratum.playjson.detailedError=true)? Or some another approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant