AsArray

io.circe.Encoder$.AsArray
See theAsArray companion object
trait AsArray[A] extends AsRoot[A]

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

Attributes

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

Members list

Concise view

Value members

Abstract methods

def encodeArray(a: A): Vector[Json]

Convert a value to a JSON array.

Convert a value to a JSON array.

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 contramapArray[B](f: B => A): AsArray[B]

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

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

Attributes

Source:
Encoder.scala
final def mapJsonArray(f: Vector[Json] => Vector[Json]): AsArray[A]

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

Create a new AsArray 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