High-performance YAML for .NET: parser, emitter, and a System.Text.Json-style object serializer.
dotnet add package SharpYaml
Available on NuGet — net8.0, net10.0, netstandard2.0
System.Text.Json: YamlSerializer, YamlSerializerOptions,
source-generated contexts, and a converter pipeline.
YamlSerializerContext and YamlTypeInfo<T>.
System.Text.Json.Serialization attributes work out of the box
(for example [JsonPropertyName], [JsonIgnore], [JsonConstructor]).
using SharpYaml;
var yaml = YamlSerializer.Serialize(new { Name = "Ada", Age = 37 });
// Name: Ada
// Age: 37
var model = YamlSerializer.Deserialize<Person>(yaml);
Next: read the Getting started guide.