AsObject

io.circe.Encoder$.AsObject
See theAsObject companion object
trait AsObject[A] extends AsRoot[A]

A type class that provides a conversion from a value of type A to a JsonObject.

Attributes

Companion:
object
Source:
Encoder.scala
Graph
Supertypes
trait AsRoot[A]
trait Encoder[A]
class Object
trait Matchable
class Any
Known subtypes
trait AsObject[A]
Self type

Members list

Concise view

Value members

Abstract methods

Convert a value to a JSON object.

Convert a value to a JSON object.

Attributes

Source:
Encoder.scala

Concrete methods

final def apply(a: A): Json

Convert a value to JSON.

Convert a value to JSON.

Attributes

Source:
Encoder.scala
final def contramapObject[B](f: B => A): AsObject[B]

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

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

Attributes

Source:
Encoder.scala

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

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

Attributes

Source:
Encoder.scala

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