JsonCodec

final case class JsonCodec[A](encoder: Encoder[A], decoder: Decoder[A])
Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

@inline
def decode(json: Json): Result[A]
@inline
def encode(a: A): Json
def flatXmap[B](f: A => Result[B])(g: B => A): JsonCodec[B]
def narrow[B <: A : ClassTag]: JsonCodec[B]
def xmap[B](f: A => B)(g: B => A): JsonCodec[B]
def xmapOrErrMsg[B](f: A => Either[ErrorMsg, B])(g: B => A): JsonCodec[B]
def xmapOrStr[B](f: A => Either[String, B])(g: B => A): JsonCodec[B]

Deprecated methods

@deprecated("Use .flatXmap", "2.0.0-RC3")
def xemap[B](f: A => Result[B])(g: B => A): JsonCodec[B]
Deprecated

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product