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

Enum of CaseClass0 should be encoded as string #526

Closed
mleclercq opened this issue Mar 19, 2023 · 0 comments · Fixed by #527
Closed

Enum of CaseClass0 should be encoded as string #526

mleclercq opened this issue Mar 19, 2023 · 0 comments · Fixed by #527

Comments

@mleclercq
Copy link
Contributor

Given

enum Color:
  case Green, Red, Blue
object Color:
  given Schema[Color] = DeriveSchema.gen
  given JsonCodec[Color] = zio.schema.codec.JsonCodec.jsonCodec(Schema[Color])

I would expect a Color.Blue to be encoded as "Blue", but it is currently encoded as {"Blue":{}}

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 a pull request may close this issue.

1 participant