Implicit conversion of Encoder and Decoder into Serializer/Deserializer/Serde
Switch branches/tags
Clone or download
Permalink
Failed to load latest commit information.
project Update sbt-pgp to 1.1.2 Nov 7, 2018
src Kafka 2.0 Staging Jul 6, 2018
.gitignore Initial commit May 9, 2018
.travis.yml Cross-build on Travis CI May 11, 2018
LICENSE LICENSE file May 14, 2018
README.md Kafka 2.0 Staging Jul 6, 2018
build.sbt Update kafka-clients to 2.0.1 Nov 9, 2018
sonatype.sbt Fix after release May 11, 2018

README.md

Circe-Kafka

Build Status

Implicitly turn your Encoder and Decoder instances into Serializer, Deserializer and Serde.

Artifact

circe-kafka is cross-compiled against Scala 2.11 and 2.12.

libraryDependencies ++= "com.nequissimus" %% "circe-kafka" % "2.0.0"

Note that this library attempts to match the Kafka version.

Usage

import io.circe.{ Decoder, Encoder }
import org.apache.kafka.common.serialization.{ Deserializer, Serde, Serializer }

final case class Foo(i: Int)

//

import nequi.circe.kafka._

implicit val encoder: Encoder[Foo] = ... // for example by importing io.circe.generic.auto._
implicit val decoder: Decoder[Foo] = ...

val serializer: Serializer[Foo] = implicitly
val deserializer: Deserializer[Foo] = implicitly
val serde: Serde[Foo] = implicitly