Decoder

com.sksamuel.avro4s.Decoder
See theDecoder companion object
trait Decoder[T]

A Decoder is used to convert an Avro value, such as a GenericRecord, SpecificRecord, GenericFixed, EnumSymbol, or a basic type, into a specified Scala type.

For example, a Decoder[String] would convert an input into a plain Java String.

Another example, a decoder for Option[String] would handle inputs of null by emitting a None, and a non-null input by emitting a String wrapped in a Some.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
Decoder[T]

Members list

Value members

Abstract methods

def decode(schema: Schema): Any => T

Concrete methods

final def map[U](f: T => U): Decoder[U]