AsArray

trait AsArray[A] extends AsRoot[A]

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

Companion:
object
Source:
Encoder.scala
trait AsRoot[A]
trait Encoder[A]
trait Serializable
class Object
trait Matchable
class Any
trait AsArray[A]

Value members

Abstract methods

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

Convert a value to a JSON array.

Convert a value to a JSON array.

Source:
Encoder.scala

Concrete methods

final def apply(a: A): Json
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.

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.

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.

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.

Inherited from:
Encoder
Source:
Encoder.scala