jsonValueToEither

given jsonValueToEither[A, B](using val left: JsonInput[A])(using val right: JsonInput[B]): JsonInput[Either[A, B]]

Converts JsonValue to Right using right converter or to Left using left if right is unsuccessful.

Value members

Concrete methods

def apply(value: JsonValue): Either[A, B]

Converts JSON value.

Converts JSON value.

Inherited methods

@unspecialized
def andThen[A](g: Either[A, B] => A): JsonValue => A
Inherited from
Function1
@unspecialized
def compose[A](g: A => JsonValue): A => Either[A, B]
Inherited from
Function1
override def toString(): String
Definition Classes
Function1 -> Any
Inherited from
Function1

Concrete fields

protected val left: JsonInput[A]
protected val right: JsonInput[B]

Extensions

Inherited extensions

extension (x: T)
def convert: Either[A, B]

x.convert converts a value x of type T to type U

x.convert converts a value x of type T to type U

Inherited from
Conversion