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

Circe KeyEncoder/KeyDecoder for String Enum #178

Merged
merged 5 commits into from Mar 14, 2018

Conversation

alonsodomin
Copy link
Contributor

Thought that it was a nice addition to the CirceStringEnum to be able to be used as a key in Maps (i.e.: Map[MyEnum, Int]).

For that, Circe requires a KeyEncoder and a KeyDecoder to be present in the implicit scope. With current enumeratum's API, implementing those is trivial for enums that are based on strings, so it could be cool to provide it out of the box.

@coveralls
Copy link

coveralls commented Feb 26, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 2cf818f on alonsodomin:circe_str_enum_as_key into d328c23 on lloydmeta:master.

@lloydmeta lloydmeta merged commit fea39d6 into lloydmeta:master Mar 14, 2018
@lloydmeta
Copy link
Owner

Just released this in 1.5.16 of enumeratum-circe. Thanks again !

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.

None yet

3 participants