Open guizmaii opened 3 years ago
Hello, @guizmaii
I hope it’s not too late to respond :)
I have to dive deeper but there seems to be some issue with DeriveJsonCodec
which does not happen when using Encoder + Decoder separately.
If you want to continue to work in the meantime, this encoding works:
package example.shared
import zio.json._
object Protocol {
object GetSuggestions {
final case class Request(search: String, prefixOnly: Option[Boolean] = None)
object Request {
implicit final val encoder: JsonEncoder[Request] = DeriveJsonEncoder.gen
implicit final val decoder: JsonDecoder[Request] = DeriveJsonDecoder.gen
}
final case class Response(suggestions: Seq[String])
object Response {
implicit final val encoder: JsonEncoder[Response] = DeriveJsonEncoder.gen
implicit final val decoder: JsonDecoder[Response] = DeriveJsonDecoder.gen
}
}
}
@fsvehla Thanks! 🙏
Was there any resolution of this in the latest versions?
Hi everyone,
I hope it's not too early to report things.
I tried to replace Circe in a Scala/ScalaJS project and I had the following errors:
It's open-source so you can easily reproduce it. See: https://github.com/keynmol/http4s-laminar-stack/pull/4/files