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

io.circe.syntax.package.scala Maven / Gradle / Ivy

There is a newer version: 0.9.3
Show newest version
package io.circe

/**
 * This package provides syntax via enrichment classes.
 */
package object syntax {
  implicit final class EncoderOps[A](val wrappedEncodeable: A) extends AnyVal {
    final def asJson(implicit encoder: Encoder[A]): Json = encoder(wrappedEncodeable)
    final def asJsonObject(implicit encoder: ObjectEncoder[A]): JsonObject =
      encoder.encodeObject(wrappedEncodeable)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy