Repository navigation
First public release.
TOMLParserparses TOML 1.0 into exact Swift-JSON 1.9.0 values:parsefor a document as[UInt8]orString; the root is always an object;parseFrontmatterfor Hugo-style+++Markdown frontmatter.
- Integers and floats are exact
JSONNumbervalues; dates and times are strings with
their exact source text; tables keep source key order. TOMLFrontmatter.splitseparates frontmatter from the body, with file-relative line
numbers.TOMLLimitsbounds input bytes, depth and node count. Cancellation is supported.TOMLErrorreports 15 stable codes with a 1-based line and column.- All 679 TOML 1.0 cases of toml-test v2.2.0 are run: 0 known failures, and 3
documented rejections ofinf/nan, which JSON cannot represent. - Tested on macOS, Linux x86_64 and arm64, and WebAssembly (WASI).
Installation
.package(url: "https://github.com/ThorFuchs/Swift-TOML.git", from: "0.1.0")Documentation: https://thorfuchs.github.io/Swift-TOML/documentation/toml/