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

io.chrisdavenport.fuuid.circe.package.scala Maven / Gradle / Ivy

The newest version!
package io.chrisdavenport.fuuid

import io.circe.syntax._
import io.circe.{Decoder, Encoder}
import cats.implicits._

package object circe {
  implicit val fuuidEncoder: Encoder[FUUID] = Encoder.instance(_.show.asJson)
  implicit val fuuidDecoder: Decoder[FUUID] =
    Decoder[String].emap(FUUID.fromString(_).leftMap(_.toString))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy