zio.blocks.schema.toon
Members list
Type members
Classlikes
Attributes
- Companion
- trait
- Source
- ArrayFormat.scala
- Supertypes
- Self type
-
ArrayFormat.type
Attributes
- Source
- ToonReader.scala
- Supertypes
This object was generated by sbt-buildinfo.
This object was generated by sbt-buildinfo.
Attributes
- Source
- BuildInfo.scala
- Supertypes
-
trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Self type
-
BuildInfo.type
Attributes
- Companion
- class
- Source
- Delimiter.scala
- Supertypes
- Self type
-
Delimiter.type
Delimiter used to separate values in TOON inline arrays.
Represents the strategy for specifying the discriminator used in a TOON schema for distinguishing between different subtypes of a sealed hierarchy.
Represents the strategy for specifying the discriminator used in a TOON schema for distinguishing between different subtypes of a sealed hierarchy.
Implementations of this trait define how the discriminator is represented in the serialized TOON, if any.
The possible discriminator kinds include:
Fieldwith adding a custom field named as specified in thenameparameter that contains a value of the subtype discriminator, e.g.type: Personfollowed by the record fields forcase class Person(...) extends SealedTraitKey, where the discriminator is represented as a TOON key with wrapping of the encoded value in a nested record, e.g.Person:followed by indented fields forcase class Person(...) extends SealedTrait.None, where no discriminator is used, meaning subtype differentiation is handled by sequential attempts to parse all possible subtypes, starting from the first subtype, until a successful parse is found, or an error is thrown if none of the subtypes can be parsed from the input.
Attributes
- Companion
- object
- Source
- DiscriminatorKind.scala
- Supertypes
- Known subtypes
Attributes
- Companion
- trait
- Source
- DiscriminatorKind.scala
- Supertypes
- Self type
-
DiscriminatorKind.type
Attributes
- Companion
- class
- Source
- KeyFolding.scala
- Supertypes
- Self type
-
KeyFolding.type
Strategy for folding nested keys in TOON output.
Strategy for folding nested keys in TOON output.
Attributes
- Companion
- object
- Source
- KeyFolding.scala
- Supertypes
- Known subtypes
Attributes
- Companion
- class
- Source
- PathExpansion.scala
- Supertypes
- Self type
-
PathExpansion.type
Strategy for expanding dot-separated paths in TOON input.
Strategy for expanding dot-separated paths in TOON input.
Attributes
- Companion
- object
- Source
- PathExpansion.scala
- Supertypes
- Known subtypes
Configuration for zio.blocks.schema.toon.ToonReader that contains params for parsing TOON input and for tuning reader behavior.
Configuration for zio.blocks.schema.toon.ToonReader that contains params for parsing TOON input and for tuning reader behavior.
All configuration params are already initialized to default values, but in some cases they should be altered:
- change the expected indentation step (default 2 spaces per level)
- change the expected delimiter for inline arrays (comma, tab, or pipe)
- disable strict mode to allow lenient parsing of malformed input
- enable path expansion to parse dot-separated keys as nested records
- set discriminator field for DynamicValue variant decoding
Value parameters
- delimiter
-
the expected delimiter character for inline arrays (default: Comma)
- discriminatorField
-
optional field name to use as discriminator for DynamicValue variants (default: None, which decodes as Record)
- expandPaths
-
strategy for expanding dot-separated paths (default: Off)
- indent
-
the expected number of spaces per indentation level (default: 2)
- strict
-
whether to enforce strict TOON parsing (default: true)
Attributes
- Companion
- object
- Source
- ReaderConfig.scala
- Supertypes
- Known subtypes
-
object ReaderConfig
Attributes
- Companion
- class
- Source
- ReaderConfig.scala
- Supertypes
- Self type
-
ReaderConfig.type
Attributes
- Companion
- class
- Source
- ToonCodec.scala
- Supertypes
- Self type
-
ToonCodec.type
Abstract class for encoding and decoding values of type A to and from TOON formats. Encapsulates logic to map TOON representations into native type structures and vice versa, handling serialization and deserialization as per TOON encoding standards using UTF-8 character set.
Abstract class for encoding and decoding values of type A to and from TOON formats. Encapsulates logic to map TOON representations into native type structures and vice versa, handling serialization and deserialization as per TOON encoding standards using UTF-8 character set.
This class requires an implementation for two core operations: decoding a value of type A from a TOON representation and encoding a value of type A into a TOON representation.
Attributes
- Companion
- object
- Source
- ToonCodec.scala
- Supertypes
Attributes
- Companion
- class
- Source
- ToonCodecDeriver.scala
- Supertypes
- Self type
-
ToonCodecDeriver.type
Attributes
- Companion
- object
- Source
- ToonCodecDeriver.scala
- Supertypes
- Known subtypes
-
object ToonCodecDeriver
Attributes
- Source
- ToonFormat.scala
- Supertypes
- Self type
-
ToonFormat.type
Attributes
- Companion
- class
- Source
- ToonReader.scala
- Supertypes
- Self type
-
ToonReader.type
A reader to parse TOON input iteratively.
A reader to parse TOON input iteratively.
Value parameters
- delimiter
-
the expected delimiter for inline arrays
- discriminatorField
-
optional field name to use as discriminator for DynamicValue variants
- expandPaths
-
strategy for expanding dot-separated paths
- indentSize
-
the expected number of spaces per indentation level
- strict
-
whether to enforce strict TOON parsing
Attributes
- Companion
- object
- Source
- ToonReader.scala
- Supertypes
A writer for iterative serialization of TOON keys and values.
A writer for iterative serialization of TOON keys and values.
Value parameters
- buf
-
an internal buffer for writing TOON data
- count
-
the current position in the internal buffer
- delimiter
-
the delimiter for inline arrays
- discriminatorField
-
optional field name to use as discriminator for DynamicValue variants
- flattenDepth
-
maximum depth for key folding
- indentSize
-
the number of spaces per indentation level
- keyFolding
-
strategy for folding nested keys
Attributes
- Companion
- object
- Source
- ToonWriter.scala
- Supertypes
Attributes
- Companion
- class
- Source
- ToonWriter.scala
- Supertypes
- Self type
-
ToonWriter.type
Configuration for zio.blocks.schema.toon.ToonWriter that contains params for formatting of output TOON and for tuning serialization behavior.
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
- Supertypes
- Known subtypes
-
object WriterConfig
Attributes
- Companion
- class
- Source
- WriterConfig.scala
- Supertypes
- Self type
-
WriterConfig.type