Repository navigation
First release: a complete YAML 1.2 implementation in pure Swift, with no Foundation and no dependencies. It builds
with Swift 6.2 or later (Xcode 26), on OS 26 for Apple platforms.
YAMLParser: a streaming event parser for YAML 1.2.2. It accepts UTF-8, UTF-16 and UTF-32 input and passes all
402 yaml-test-suite cases.YAMLDocument/YAMLNode: a node graph that keeps tags, anchors, styles and source ranges. Aliases are
resolved within limits, and recursion is rejected.
YAMLNode(plain:schema:)builds a plain scalar tagged as the schema resolves it, and a mapping's entries are
found by key (node.mapping?["name"]).YAMLSchema: the failsafe, JSON, core and YAML 1.1 schemas. A%YAML 1.1directive selects YAML 1.1
automatically.YAMLValue: an order-preserving, JSON-like value with merge keys, a duplicate-key policy, timestamps and binary.YAMLEmitter: emits nodes and values with style analysis, so every scalar reads back identically.YAMLDecoder/YAMLEncoder: a Codable bridge. An integer type doesn't decode from a float (10.0,1e3), as in Yams;
YAMLOptions.lenientIntegerslets it, asJSONDecoderdoes.YAMLOptions.lenientFlowIndentation: reads flow lines indented no more than their block parent, as libyaml does
(off by default: YAML 1.2 makes them an error).- Every entry point that takes bytes accepts any
Collection<UInt8>(an array, a slice, Foundation'sData) and a
borrowedSpan<UInt8>. A UTF-8 byte order mark is dropped in place, without a second copy of the input. - RFC 9512 fragment identifiers:
YAMLDocument.node(atFragment:). - The Yams test suite, ported to Swift Testing.