zio.blocks.schema.codec
Members list
Type members
Classlikes
Represents a specialized codec for encoding and decoding values between binary input and output representations using ByteBuffer.
Represents a specialized codec for encoding and decoding values between binary input and output representations using ByteBuffer.
This abstraction is commonly used with binary formats (e.g., Avro) where both encoding and decoding operations are performed using ByteBuffer as the underlying data representation.
Type parameters
- A
-
The type of values being encoded or decoded.
Attributes
- Source
- BinaryCodec.scala
- Supertypes
- Known subtypes
-
class AvroCodec[A]class JsonCodec[A]class MessagePackCodec[A]class ThriftCodec[A]class ToonCodec[A]class XmlCodec[A]class YamlCodec[A]Show all
A tag that can be used to uniquely identify a binary format, such as Avro. Each format should have its own nominal type, together with a singleton value of that type.
A tag that can be used to uniquely identify a binary format, such as Avro. Each format should have its own nominal type, together with a singleton value of that type.
e.g.:
import zio.blocks.schema.codec._
import zio.blocks.schema.derive.Deriver
abstract class AvroCodec[A] extends BinaryCodec[A]
lazy val AvroDeriver: Deriver[AvroCodec] = ??? // the deriver of your codecs
sealed abstract class Avro extends BinaryFormat[AvroCodec]("application/avro", AvroDeriver)
case object Avro extends Avro
Attributes
- Source
- Format.scala
- Supertypes
- Known subtypes
-
object AvroFormatobject JsonFormatobject MessagePackFormatobject ThriftFormatobject ToonFormatobject XmlFormatobject YamlFormatShow all
Represents an abstraction for encoding and decoding values between a specific input representation and a specific output representation.
Represents an abstraction for encoding and decoding values between a specific input representation and a specific output representation.
Type parameters
- DecodeInput
-
The type of input data used for decoding operations.
- EncodeOutput
-
The type of output data used for encoding operations.
- Value
-
The type of values being encoded or decoded.
Attributes
- Source
- Codec.scala
- Supertypes
- Known subtypes
-
class BinaryCodec[A]class AvroCodec[A]class JsonCodec[A]class MessagePackCodec[A]class ThriftCodec[A]class ToonCodec[A]class XmlCodec[A]class YamlCodec[A]class TextCodec[A]class CsvCodec[A]class HeaderCodec[A]class QueryCodec[A]Show all
A format is a type that represents a specific serialization format, such as Avro or JSON. Each format should have a unique MIME type that identifies it, which is used both for debugging purposes, and potentially in transport, depending on the protocol.
A format is a type that represents a specific serialization format, such as Avro or JSON. Each format should have a unique MIME type that identifies it, which is used both for debugging purposes, and potentially in transport, depending on the protocol.
A format is associated with a specific type class, such as BinaryCodec for binary formats, or TextCodec for text formats, and a deriver that can be used to derive the codec for the format.
Attributes
- Source
- Format.scala
- Supertypes
- Known subtypes
-
class BinaryFormat[TC]object AvroFormatobject JsonFormatobject MessagePackFormatobject ThriftFormatobject ToonFormatobject XmlFormatobject YamlFormatclass TextFormat[TC]object CsvFormatShow all
Represents a specialized codec for encoding and decoding values between text-based input and output representations using CharBuffer.
Represents a specialized codec for encoding and decoding values between text-based input and output representations using CharBuffer.
This abstraction is typically used with text-based formats (e.g., JSON) where both encoding and decoding operations are performed using CharBuffer as the underlying data representation.
Type parameters
- A
-
The type of values being encoded or decoded.
Attributes
- Source
- TextCodec.scala
- Supertypes
- Known subtypes
-
class CsvCodec[A]
A tag that can be used to uniquely identify a text format, such as ZioJson. Each format should have its own nominal type, together with a singleton value of that type.
A tag that can be used to uniquely identify a text format, such as ZioJson. Each format should have its own nominal type, together with a singleton value of that type.
e.g.:
import zio.blocks.schema.codec._
import zio.blocks.schema.derive.Deriver
abstract class ZioJsonCodec[A] extends TextCodec[A]
lazy val ZioJsonDeriver: Deriver[ZioJsonCodec] = ??? // the deriver of your codecs
sealed abstract class ZioJson extends TextFormat[ZioJsonCodec]("application/zio-json", ZioJsonDeriver)
case object ZioJson extends ZioJson
Attributes
- Source
- Format.scala
- Supertypes
- Known subtypes
-
object CsvFormat