AsRoot

io.circe.Encoder.AsRoot
See theAsRoot companion object
trait AsRoot[A] extends Encoder[A]

A subtype of Encoder that statically verifies that the instance encodes either a JSON array or an object.

Attributes

Companion
object
Source
Encoder.scala
Graph
Supertypes
trait Encoder[A]
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
trait AsRoot[A]
trait AsArray[A]
trait AsObject[A]
trait ConfiguredCodec[A]
trait AsArray[A]
trait AsObject[A]
Show all

Members list

Value members

Inherited methods

final def contramap[B](f: B => A): Encoder[B]

Create a new Encoder by applying a function to a value of type B before encoding as an A.

Create a new Encoder by applying a function to a value of type B before encoding as an A.

Attributes

Inherited from:
Encoder
Source
Encoder.scala
final def mapJson(f: Json => Json): Encoder[A]

Create a new Encoder by applying a function to the output of this one.

Create a new Encoder by applying a function to the output of this one.

Attributes

Inherited from:
Encoder
Source
Encoder.scala

Inherited and Abstract methods

def apply(a: A): Json

Convert a value to JSON.

Convert a value to JSON.

Attributes

Inherited from:
Encoder
Source
Encoder.scala