Return an instance for a given type A
.
Note that on Scala.
Note that on Scala.js the encoding of Float
values is subject to the
usual limitations of Float#toString
on that platform (e.g. 1.1f
will be
encoded as a Json value that will be printed as "1.100000023841858"
).
Construct an instance for a given type with a cats.Foldable instance.
object WeekDay extends Enumeration { ... } implicit val weekDayEncoder = Encoder.enumEncoder(WeekDay)
Construct an instance from a function.
Instance creation methods for disjunction-like types. Note that these instances are not implicit, since they require non-obvious decisions about the names of the discriminators. If you want instances for these types you can include the following import in your program:
import io.circe.disjunctionCodecs._
Utilities and instances for Encoder.