I have a method exposed on my API that looks like this:
def read[T](implicit decoder: Decoder[T]): T
A user can bring along any T
they like and my code will attempt to parse the json result into a T
.
The issue I want to resolve is that any user must also import io.circe.generic.auto._
in order to get this to work and auto-derive the Decoder[T]
.
Is there any way I can change my API to avoid the user having to bring this import?