zio/zio-json

Enum case objects serialize to string

liewhite opened this issue · 0 comments

Serialize case object to {} is weird. Like serde_json in rust, enum case object just serialize to string.

For example:

enum E{
case A
case B
} derives JsonEncoder

E.A.toJson // "A" instead of {}