Formal Standard
Specification (v0.1.0-draft)
Normative lexical rules, LL(1) EBNF grammar summary, and implementation limits for Loom parsers.
The authoritative specification and language-neutral JSON conformance test suite live in loomcfg/spec.
Implementation Limits
Compliant parsers must enforce deterministic resource bounds:
- Maximum nesting depth:
128levels (objects and arrays combined). - Maximum
@importdepth:32levels. - Maximum document size:
16 MiBdefault limit.
Canonical Formatting Rules (loom fmt)
- UTF-8 encoding (no BOM) with
\nline endings and one trailing newline. - 2-space indentation for nested objects and arrays.
- Single space after colon (
key: value). - Multi-line collections omit trailing commas; single-line collections separate items with
,.