All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tethys.writers.EmptyWriters.scala Maven / Gradle / Ivy

There is a newer version: 0.29.0
Show newest version
package tethys.writers

import tethys.JsonWriter
import tethys.writers.tokens.TokenWriter

trait EmptyWriters {
  def emptyWriter[A]: JsonWriter[A] = new JsonWriter[A] {
    override def write(name: String, value: A, tokenWriter: TokenWriter): Unit =
      ()
    override def write(value: A, tokenWriter: TokenWriter): Unit = ()
  }
}

object EmptyWriters extends EmptyWriters




© 2015 - 2024 Weber Informatics LLC | Privacy Policy