Don't blame

How not to serialize binary data:

import io.circe._

final case class Message(body: ByteString)

object Message {
  implicit val encodeMessage: Encoder[Message] =
    Encoder.instance { message =>
      val array = message.body.toByteArray

Sadly, I actually saw this today… I didn’t do a git blame; I guess I’d never be able to look at that person again 😢