TextFormat
zio.blocks.schema.codec.TextFormat
abstract class TextFormat[TC <: (TextCodec)](val mimeType: String, val deriver: Deriver[TC]) extends Format
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
- Graph
-
- Supertypes
- Known subtypes
-
object CsvFormat
Members list
In this article