sksamuel / avro4s

Avro schema generation and serialization / deserialization for Scala
Apache License 2.0
714 stars 236 forks source link

could not find implicit value for evidence parameter of type com.sksamuel.avro4s.Encoder[K] #800

Open aarushiavlino opened 9 months ago

aarushiavlino commented 9 months ago

Hi, I am trying the below code

class Test[K,V]{
  private implicit val produced: Produced[GenericRecord, GenericRecord] = Produced.`with`(keyGenericAvroSerde, valueGenericAvroSerde)
  def sendTransformedOutput(kStreams:KStream[K,V],outputTopic:String)={
    kStreams.map[GenericRecord, GenericRecord] ((k, v) => (RecordFormat[K].to(k), RecordFormat[V].to(v))).to(outputTopic)
  }
}     

but getting below error , could not find implicit value for evidence parameter of type com.sksamuel.avro4s.Encoder[K]

How can I fix it ? avro version- "4.1.1" scala version -"2.13.12"