-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
The implicit function genericObjectEncoder does not work with Coproduct as descibed in the book.
The current definition is as followed:
implicit def genericObjectEncoder[A, H <: HList](
implicit
gen: LabelledGeneric.Aux[A, H],
hEncoder: Lazy[JsonObjectEncoder[H]]
): JsonEncoder[A] =
createObjectEncoder(value => hEncoder.value.encode(gen.to(value)))To make this work, I have to remove <: HList.
I do not know why this is the case, but I would love to find out more about it.
Other users reported knownDirectSubclasses bug, but I do not see this error message.
Metadata
Metadata
Assignees
Labels
No labels