Closes two of the four emitter gaps a feature-parity audit against Yams found (PureYAMLYamsComparison's FEATURE-PARITY.md): no configurable indentation and no sorted-key output. indentWidth replaces every hardcoded indent + 2 in Dumper.swift/ Dumper.Mapping.swift, verified with round-trip tests since indentation is purely a rendering choice and must never change what a document means. sortKeys sorts a mapping's pairs by their string key in both block and flow style, but only when every key in that mapping is a plain string; a mapping with any complex (mapping/sequence) key stays in insertion order, since there is no well-defined ordering across mixed key kinds. Off by default, since insertion order is what makes a duplicate-key-preserving Mapping round-trip meaningfully in the first place. width-based line wrapping and canonical mode are each a correctness surface of their own and are deliberately left for later, not folded into this. |
||
|---|---|---|
| .. | ||
| Coding | ||
| Decoding | ||
| Emitting | ||
| Encoding | ||
| Model | ||
| Parsing | ||
| PureYAMLJSON | ||
| Stream | ||
| Streaming | ||
| Tagged | ||
| Validation | ||
| API.swift | ||
| PureYAML.swift | ||