Skip to content

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

Open
Jenya95 wants to merge 6 commits into
lloydmeta:masterfrom
Jenya95:ISSUE-409
Open

Detailed error on Enum reads in enumeratum-play-json#411
Jenya95 wants to merge 6 commits into
lloydmeta:masterfrom
Jenya95:ISSUE-409

Conversation

@Jenya95

@Jenya95 Jenya95 commented Nov 24, 2024

Copy link
Copy Markdown

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