Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class JsonSink[-A](internalSink: Sink[String])(implicit encode: Encoder[A]) extends Sink[A] {
  override def apply(a: A): Async[Unit] = {
    internalSink(encode(a).noSpaces)
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment