Variants Reference
A variant is a named profile that bundles behavior choices and expected feature support into a single spec-compliance posture. Implementations declare a variant to say “I aim to match this reading of the spec.”
Variants exist so the test suite can filter on a single field rather than enumerating every (behavior, feature) tuple that defines a conformance level.
Each heading below is the canonical anchor for the corresponding variant:* tag in the test suite.
reference_compliant
Section titled “reference_compliant”Tag: variant:reference_compliant
Matches the OCaml reference implementation’s semantics. An implementation declaring reference_compliant commits to:
toplevel_indent_stripfor continuation baseline —parseuses N = 0 at top level, top-level keys areString.trim-ed.continuation_tab_to_spacefor continuation tab handling — leading\ton continuation lines normalizes 1:1 to a single space.indent_spacesfor indentation output — formatting functions emit two spaces per level.- Support for the
tab_in_value_preservedandtoplevel_indent_stripfeatures. - The bare-list hierarchy shape (array of objects) for
build_hierarchyoutput. - The CRLF uniform-handling rule when combined with
crlf_preserve_literal.
New implementations should target this variant unless they have a specific reason to diverge.