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

pl.iterators.baklava.circe.CirceJsonStringProvider.scala Maven / Gradle / Ivy

The newest version!
package pl.iterators.baklava.circe

import io.circe.Encoder
import pl.iterators.baklava.core.model.JsonStringPrinter

trait CirceJsonStringProvider {

  implicit val unitPrinter: JsonStringPrinter[Unit] = (obj: Unit) => ""

  implicit def circeJsonString[T](implicit encoder: Encoder[T]): JsonStringPrinter[T] = (obj: T) => encoder.apply(obj).toString()

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy