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

sensitive.circe.SensitiveEncoder.scala Maven / Gradle / Ivy

The newest version!
package sensitive.circe

import io.circe.Encoder
import io.circe.Json
import sensitive.Sensitive
import sensitive.derivation.Derived

class SensitiveEncoder[A: Sensitive](implicit ev: Derived[Encoder[A]]) extends Encoder[A] {
  override def apply(a: A): Json = ev.value.apply(a.masked)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy