I have a scala case class as follows
case class Intro(name : String, quality : Any)
I am using scala circe
library for encoding this object to Json.
The code which i am using is
import io.circe._
import io.circe.generic.auto._
import io.circe.syntax._
object Example extends App{
println(Intro("Vikash","something").asJson)
}
It is giving me following error during compilation.
could not find implicit value for parameter encoder: io.circe.Encoder[com.xxx.Intro]
If i change the type of case class attribute quality
to type String
then it works fine.
How to encode case class with Any
type in attribute
Thanks