object Codec
- Alphabetic
- By Inheritance
- Codec
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- sealed abstract class Alt[A] extends AnyRef
- sealed abstract class AltBuilder[A] extends AnyRef
- sealed abstract class Field[A, B] extends AnyRef
- sealed abstract class FieldBuilder[A] extends AnyRef
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def apply[A](implicit codec: Codec[A]): Codec[A]
Returns the Codec for the specified type.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- implicit final val boolean: Codec[Boolean]
- implicit final val byte: Codec[Byte]
- implicit final val bytes: Codec[Array[Byte]]
- implicit final def chain[A](implicit codec: Codec[A]): Codec[Chain[A]]
- implicit final val char: Codec[Char]
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- implicit final val codecInvariant: Invariant[Codec]
- implicit final def codecShow[A]: Show[Codec[A]]
- final def decimal(precision: Int, scale: Int): Codec[BigDecimal]
Returns a new decimal Codec for type
BigDecimal
. - final def decode[A](value: Any)(implicit codec: Codec[A]): Either[AvroError, A]
Returns the result of decoding the specified value to the specified type.
- final def deriveEnum[A](symbols: Seq[String], encode: (A) => String, decode: (String) => Either[AvroError, A])(implicit tag: scala.reflect.api.JavaUniverse.WeakTypeTag[A]): Codec[A]
Returns an enum Codec for type
A
, deriving details like the name, namespace, and AvroDoc documentation from the typeA
using type tags. - final def deriveFixed[A](size: Int, encode: (A) => Array[Byte], decode: (Array[Byte]) => Either[AvroError, A])(implicit tag: scala.reflect.api.JavaUniverse.WeakTypeTag[A]): Codec[A]
Returns a fixed Codec for type
A
, deriving details like the name, namespace, and AvroDoc documentation from the typeA
using type tags. - implicit final val double: Codec[Double]
- final def encode[A](a: A)(implicit codec: Codec[A]): Either[AvroError, Any]
Returns the result of encoding the specified value.
- final def enum[A](name: String, symbols: Seq[String], encode: (A) => String, decode: (String) => Either[AvroError, A], namespace: Option[String] = None, aliases: Seq[String] = Seq.empty, doc: Option[String] = None, default: Option[A] = None, props: Props = Props.empty): Codec[A]
Returns a new enum Codec for type
A
. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def fixed[A](name: String, size: Int, encode: (A) => Array[Byte], decode: (Array[Byte]) => Either[AvroError, A], namespace: Option[String] = None, aliases: Seq[String] = Seq.empty, doc: Option[String] = None, props: Props = Props.empty): Codec[A]
Returns a new fixed Codec for type
A
.Returns a new fixed Codec for type
A
.When encoding, bytes are zero-padded to the specified size. Zero-padding is applied at the end, and will remain in the input to
decode
. Encoding checks to ensure the size is not exceeded, while decoding ensures the exact size. - implicit final val float: Codec[Float]
- final def fromBinary[A](bytes: Array[Byte])(implicit codec: Codec[A]): Either[AvroError, A]
Returns the result of decoding the specified Avro binary to the specified type.
- final def fromJson[A](json: String)(implicit codec: Codec[A]): Either[AvroError, A]
Returns the result of decoding the specified Avro JSON to the specified type.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def instance[A](schema: Either[AvroError, Schema], encode: (A, Schema) => Either[AvroError, Any], decode: (Any, Schema) => Either[AvroError, A]): Codec[A]
Returns a new Codec instance using the specified
Schema
, and encode and decode functions. - implicit final val instant: Codec[Instant]
- implicit final val int: Codec[Int]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit final def list[A](implicit codec: Codec[A]): Codec[List[A]]
- implicit final val localDate: Codec[LocalDate]
- implicit final val long: Codec[Long]
- implicit final def map[A](implicit codec: Codec[A]): Codec[Map[String, A]]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- implicit final def nonEmptyChain[A](implicit codec: Codec[A]): Codec[NonEmptyChain[A]]
- implicit final def nonEmptyList[A](implicit codec: Codec[A]): Codec[NonEmptyList[A]]
- implicit final def nonEmptySet[A](implicit codec: Codec[A], ordering: Ordering[A]): Codec[NonEmptySet[A]]
- implicit final def nonEmptyVector[A](implicit codec: Codec[A]): Codec[NonEmptyVector[A]]
- implicit final val none: Codec[None.type]
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit final def option[A](implicit codec: Codec[A]): Codec[Option[A]]
- final def record[A](name: String, namespace: Option[String] = None, doc: Option[String] = None, aliases: Seq[String] = Seq.empty, props: Props = Props.empty)(f: (FieldBuilder[A]) => FreeApplicative[[β$0$]Field[A, β$0$], A]): Codec[A]
Returns a new record Codec for type
A
. - implicit final def seq[A](implicit codec: Codec[A]): Codec[Seq[A]]
- implicit final def set[A](implicit codec: Codec[A]): Codec[Set[A]]
- implicit final val short: Codec[Short]
- implicit final def some[A](implicit codec: Codec[A]): Codec[Some[A]]
- implicit final val string: Codec[String]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toBinary[A](a: A)(implicit codec: Codec[A]): Either[AvroError, Array[Byte]]
Returns the result of encoding the specified value to Avro binary.
- final def toJson[A](a: A)(implicit codec: Codec[A]): Either[AvroError, String]
Returns the result of encoding the specified value to Avro JSON.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def union[A](f: (AltBuilder[A]) => Chain[Alt[A]])(implicit tag: scala.reflect.api.JavaUniverse.WeakTypeTag[A]): Codec[A]
Returns a new union Codec for type
A
. - implicit final val unit: Codec[Unit]
- implicit final val uuid: Codec[UUID]
- implicit final def vector[A](implicit codec: Codec[A]): Codec[Vector[A]]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Inherited from AnyRef
Inherited from Any
General Codecs
Default codecs for standard library types.
Collection Codecs
Default codecs for standard library collection types.
Cats Codecs
Default codecs for Cats data types and type class instances for Codec.
Java Time Codecs
Default codecs for java.time
types.
Java Util Codecs
Default codecs for java.util
types.
Create Codecs
Functions for creating new codecs.
Derive Codecs
Functions for deriving new codecs.
Utilities
Miscellaneous utility functions.