# toon_ex v1.3.1 - Table of Contents

> TOON encoder/decoder for Elixir, TOON <--> JSON converter, supported for Phoenix Channels.

## Pages

- [ToonEx](readme.md)
- [LICENSE](license.md)

## Modules

- [ToonEx](ToonEx.md): TOON (Token-Oriented Object Notation) encoder and decoder for Elixir.
- [ToonEx.Btoon](ToonEx.Btoon.md): BTOON — a compact binary codec for the TOON data model.
- [ToonEx.Btoon.Binary](ToonEx.Btoon.Binary.md): Wraps a raw binary value so the encoder emits tag `0x08` (Binary) instead
of tag `0x07` (String). Plain Elixir binaries are always encoded as UTF-8
strings.
- [ToonEx.Btoon.Constants](ToonEx.Btoon.Constants.md): Binary constants for the BTOON wire format.
- [ToonEx.Btoon.Decode](ToonEx.Btoon.Decode.md): BTOON decoder.
- [ToonEx.Btoon.Decode.Options](ToonEx.Btoon.Decode.Options.md): Validation and normalization of BTOON decoding options.
- [ToonEx.Btoon.Dictionary](ToonEx.Btoon.Dictionary.md): A session string dictionary.
- [ToonEx.Btoon.ElementType](ToonEx.Btoon.ElementType.md): Element type selectors and raw numeric encoding helpers.
- [ToonEx.Btoon.Encode](ToonEx.Btoon.Encode.md): BTOON encoder.
- [ToonEx.Btoon.Encode.Options](ToonEx.Btoon.Encode.Options.md): Validation and normalization of BTOON encoding options.
- [ToonEx.Btoon.Encoder](ToonEx.Btoon.Encoder.md): Protocol for encoding custom data structures to BTOON format.
- [ToonEx.Btoon.ImplHelper](ToonEx.Btoon.ImplHelper.md): Helper macro for generating ToonEx.Btoon.Encoder protocol implementations.
- [ToonEx.Btoon.ObjectTable](ToonEx.Btoon.ObjectTable.md): A columnar table of homogeneous numeric columns (tag `0x0D`).
- [ToonEx.Btoon.ObjectTable.Column](ToonEx.Btoon.ObjectTable.Column.md): A single column definition of an `Btoon.ObjectTable`.
- [ToonEx.Btoon.Phoenix.Serializer](ToonEx.Btoon.Phoenix.Serializer.md): Satisfies the `PhoenixClient` JSON-parser contract, which requires
`encode/2`, `encode!/2`, `decode/2`, `decode!/2` and `encode_to_iodata!`.  The
optional `opts` argument is accepted but intentionally ignored so that this
module can be dropped in wherever a standard JSON library is expected.
- [ToonEx.Btoon.Schema](ToonEx.Btoon.Schema.md): A named, typed record schema for schema-mode encoding.
- [ToonEx.Btoon.SchemaCompiler](ToonEx.Btoon.SchemaCompiler.md): Compiles a BTOON schema into a specialized encoder function.
- [ToonEx.Btoon.TypedArray](ToonEx.Btoon.TypedArray.md): A homogeneous numeric array stored as a contiguous binary buffer.
- [ToonEx.Btoon.Types](ToonEx.Btoon.Types.md): Type definitions and wrapper types for the BTOON codec.
- [ToonEx.Decode.Parser](ToonEx.Decode.Parser.md): NimbleParsec-based parser for TOON format.
- [ToonEx.Decode.StructuralParser](ToonEx.Decode.StructuralParser.md): Structural parser for TOON format that handles indentation-based nesting.
- [ToonEx.Encode.Stream](ToonEx.Encode.Stream.md): Streaming encoder for TOON format.
- [ToonEx.Fragment](ToonEx.Fragment.md): Provides a way to inject an already-encoded TOON structure into a
to-be-encoded structure in optimized fashion.
- [ToonEx.Helpers](ToonEx.Helpers.md): Provides macro facilities for partial compile-time encoding of TOON.
- [ToonEx.OrderedObject](ToonEx.OrderedObject.md): A TOON object that preserves the order of its keys.

- Encoding
  - [ToonEx.Encode](ToonEx.Encode.md): Main encoder for TOON format.
  - [ToonEx.Encode.Arrays](ToonEx.Encode.Arrays.md): Encoding of TOON arrays in three formats:
- Inline: for primitive arrays (e.g., tags[2]: reading,gaming)
- Tabular: for uniform object arrays (e.g., users[2]{name,age}: Alice,30 / Bob,25)
- List: for mixed or non-uniform arrays

  - [ToonEx.Encode.Objects](ToonEx.Encode.Objects.md): Encoding of TOON objects (maps).

  - [ToonEx.Encode.Options](ToonEx.Encode.Options.md): Validation and normalization of encoding options.

  - [ToonEx.Encode.Primitives](ToonEx.Encode.Primitives.md): Encoding of primitive TOON values (nil, boolean, number, string).

  - [ToonEx.Encode.Strings](ToonEx.Encode.Strings.md): String encoding utilities for TOON format.
  - [ToonEx.Encode.Writer](ToonEx.Encode.Writer.md): Writer for building TOON output incrementally with efficient indentation handling.

  - [ToonEx.Encoder](ToonEx.Encoder.md): Protocol for encoding custom data structures to TOON format.

- Decoding
  - [ToonEx.Decode](ToonEx.Decode.md): Main decoder for TOON format.
  - [ToonEx.Decode.Fast.Decoder](ToonEx.Decode.Fast.Decoder.md): High-performance TOON decoder using pure binary pattern matching.
  - [ToonEx.Decode.Options](ToonEx.Decode.Options.md): Validation and normalization of decoding options.

- Convertors
  - [ToonEx.JSON](ToonEx.JSON.md): Transforms between JSON and TOON format.

- ImplHelpers
  - [ToonEx.ToonImplHelper](ToonEx.ToonImplHelper.md): Helper macro for generating ToonEx.Encoder protocol implementations.

- Phoenix
  - [ToonEx.Phoenix.Serializer](ToonEx.Phoenix.Serializer.md): Satisfies the `PhoenixClient` JSON-parser contract, which requires
`encode/2`, `encode!/2`, `decode/2`, `decode!/2` and `encode_to_iodata!`.  The optional
`opts` argument is accepted but intentionally ignored so that this
module can be dropped in wherever a standard JSON library is expected.

- Shared Types
  - [ToonEx.Constants](ToonEx.Constants.md): Constants used throughout the TOON encoder and decoder.
  - [ToonEx.Types](ToonEx.Types.md): Type definitions for TOON encoder and decoder.

- Errors
  - [ToonEx.DecodeError](ToonEx.DecodeError.md): Exception raised when decoding fails.
  - [ToonEx.EncodeError](ToonEx.EncodeError.md): Exception raised when encoding fails.

- Exceptions
  - [ToonEx.Btoon.DecodeError](ToonEx.Btoon.DecodeError.md): Exception raised when BTOON decoding fails.
  - [ToonEx.Btoon.EncodeError](ToonEx.Btoon.EncodeError.md): Exception raised when BTOON encoding fails.
  - [ToonEx.Options.Validator](ToonEx.Options.Validator.md): Pure Elixir options validator to replace NimbleOptions.

