Skip to content
uencoder

TOML Arrays

TOML arrays are defined with square brackets [v1, v2], supporting heterogeneous types, nesting, and a multiline form; they are TOML's collection type.

Purpose

To represent list data in TOML configuration, supporting mixed types and nesting.

Mechanism

[1, 2, 3] defines an array; elements can be any TOML type (including nested arrays and tables); a multiline array can put one element per line, with an optional trailing comma. Element types are not fixed (arrays may be heterogeneous).

Use cases

  • TOML configuration lists
  • Dependency list definitions
  • Multi-value parameters

Related tools

References