WriterConfig

zio.blocks.schema.toon.WriterConfig
See theWriterConfig companion object
class WriterConfig extends Serializable

Configuration for zio.blocks.schema.toon.ToonWriter that contains params for formatting of output TOON and for tuning serialization behavior.

All configuration params are already initialized to default values, but in some cases they should be altered:

  • change the indentation step (default 2 spaces per level)
  • change the delimiter for inline arrays (comma, tab, or pipe)
  • enable key folding to produce more compact output for shallow structures
  • adjust flatten depth to control when nested records use indentation
  • set discriminator field for DynamicValue variant encoding

Value parameters

delimiter

the delimiter character for inline arrays (default: Comma)

discriminatorField

optional field name to use as discriminator for DynamicValue variants (default: None, which uses key-style encoding)

flattenDepth

maximum depth at which to flatten nested structures (default: Int.MaxValue)

indent

the number of spaces per indentation level (default: 2)

keyFolding

strategy for folding nested keys (default: Off)

Attributes

Companion
object
Source
WriterConfig.scala
Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
object WriterConfig

Members list

Value members

Concrete methods

Attributes

Source
WriterConfig.scala
def withDiscriminatorField(discriminatorField: Option[String]): WriterConfig

Attributes

Source
WriterConfig.scala
def withFlattenDepth(flattenDepth: Int): WriterConfig

Attributes

Source
WriterConfig.scala
def withIndent(indent: Int): WriterConfig

Attributes

Source
WriterConfig.scala

Attributes

Source
WriterConfig.scala

Concrete fields

Attributes

Source
WriterConfig.scala
val discriminatorField: Option[String]

Attributes

Source
WriterConfig.scala
val flattenDepth: Int

Attributes

Source
WriterConfig.scala
val indent: Int

Attributes

Source
WriterConfig.scala

Attributes

Source
WriterConfig.scala