-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JsonCodec ≠ JsonDecoder + JsonEncoder: could not find JsonCodec.Typeclass for type String #167
Labels
Comments
Hello, @guizmaii I hope it’s not too late to respond :) I have to dive deeper but there seems to be some issue with 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? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: