YAML that means the same thing everywhere. Edits that keep your comments.
oneyaml is a family of YAML 1.2 libraries, one per language. Each is written from scratch to feel native in its language, and all of them read, write and edit YAML the same way.
cargo add oneyamlChange one value. Everything else stays exactly as you wrote it.
# Web service server: host: 0.0.0.0 port: 8080 # public tags: [web]
# Web service server: host: 0.0.0.0 port: 9090 # public tags: [web, api]
One parser, one meaning
Typed reads and the editable document share one parser, so they never disagree about what a file means.
Minimal-diff edits
An untouched file writes back byte for byte. An edit changes only the value you set, in its own style.
Correct YAML 1.2
yes is a string and 0755 is a decimal. YAML 1.1 behavior is opt-in, never a surprise.
Safe on any input
No crashes on hostile files. Limits on nesting and alias expansion are on by default.
Languages
-
Rust
Availableserde and lossless editing in one crate. Passes all 402 cases of the YAML test suite. No
unsafe.cargo add oneyaml -
Go
In developmentPure Go, no dependencies outside the standard library. Load and dump in the style of
encoding/json, plus a document you can edit in place."oneyaml.dev/go" -
C#
Coming soonWritten from scratch for .NET, with the same behavior as every oneyaml library.
Conformance
Checked, not promised.
The libraries share behavior, not code. One open test suite holds that behavior as data: the full YAML test suite plus cases for edits, patches, errors and safety. Every library runs it before release, and so can you, against any YAML library.