![]() |
VOOZH | about |
dotnet add package YamlDotNet --version 18.0.0
NuGet\Install-Package YamlDotNet -Version 18.0.0
<PackageReference Include="YamlDotNet" Version="18.0.0" />
<PackageVersion Include="YamlDotNet" Version="18.0.0" />Directory.Packages.props
<PackageReference Include="YamlDotNet" />Project file
paket add YamlDotNet --version 18.0.0
#r "nuget: YamlDotNet, 18.0.0"
#:package YamlDotNet@18.0.0
#addin nuget:?package=YamlDotNet&version=18.0.0Install as a Cake Addin
#tool nuget:?package=YamlDotNet&version=18.0.0Install as a Cake Tool
| Appveyor | NuGet |
|---|---|
| 👁 Build status |
👁 NuGet |
YamlDotNet is a YAML library for netstandard and other .NET runtimes.
YamlDotNet provides low level parsing and emitting of YAML as well as a high level object model similar to XmlDocument. A serialization library is also included that allows to read and write objects from and to YAML streams.
YamlDotNet's conformance with YAML specifications:
| YAML Spec | YDN Parser | YDN Emitter |
|---|---|---|
| v1.1 | ✓ | ✓ |
| v1.2 | ✓ |
YAML, which stands for "YAML Ain't Markup Language", is described as "a human friendly data serialization standard for all programming languages". Like XML, it allows to represent about any kind of data in a portable, platform-independent format. Unlike XML, it is "human friendly", which means that it is easy for a human to read or produce a valid YAML document.
The library has now been successfully used in multiple projects and is considered fairly stable. It is compatible with the following runtimes:
Here are some quick samples to get you started which can be viewed in this fiddle.
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
...
var person = new Person
{
Name = "Abe Lincoln",
Age = 25,
HeightInInches = 6f + 4f / 12f,
Addresses = new Dictionary<string, Address>{
{ "home", new Address() {
Street = "2720 Sundown Lane",
City = "Kentucketsville",
State = "Calousiyorkida",
Zip = "99978",
}},
{ "work", new Address() {
Street = "1600 Pennsylvania Avenue NW",
City = "Washington",
State = "District of Columbia",
Zip = "20500",
}},
}
};
var serializer = new SerializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance)
.Build();
var yaml = serializer.Serialize(person);
System.Console.WriteLine(yaml);
// Output:
// name: Abe Lincoln
// age: 25
// heightInInches: 6.3333334922790527
// addresses:
// home:
// street: 2720 Sundown Lane
// city: Kentucketsville
// state: Calousiyorkida
// zip: 99978
// work:
// street: 1600 Pennsylvania Avenue NW
// city: Washington
// state: District of Columbia
// zip: 20500
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
...
var yml = @"
name: George Washington
age: 89
height_in_inches: 5.75
addresses:
home:
street: 400 Mockingbird Lane
city: Louaryland
state: Hawidaho
zip: 99970
";
var deserializer = new DeserializerBuilder()
.WithNamingConvention(UnderscoredNamingConvention.Instance) // see height_in_inches in sample yml
.Build();
//yml contains a string containing your YAML
var p = deserializer.Deserialize<Person>(yml);
var h = p.Addresses["home"];
System.Console.WriteLine($"{p.Name} is {p.Age} years old and lives at {h.Street} in {h.City}, {h.State}.");
// Output:
// George Washington is 89 years old and lives at 400 Mockingbird Lane in Louaryland, Hawidaho.
More information can be found in the project's wiki.
Just install the YamlDotNet NuGet package:
PM> Install-Package YamlDotNet
If you do not want to use NuGet, you can download binaries here.
YamlDotNet is also available on the Unity Asset Store.
Please read for guidelines.
Please see the Releases at https://github.com/aaubry/YamlDotNet/releases
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 is compatible. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 is compatible. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on YamlDotNet:
| Package | Downloads |
|---|---|
|
KubernetesClient
Client library for the Kubernetes open source container orchestrator. |
|
|
NJsonSchema.Yaml
JSON Schema reader, generator and validator for .NET |
|
|
WireMock.Net.OpenApiParser
An OpenApi (swagger) parser to generate MappingModel or mapping.json file. |
|
|
KubernetesClient.Models
Client library for the Kubernetes open source container orchestrator. |
|
|
RamlToOpenApiConverter
Convert RAML file to Open API Specification |
Showing the top 20 popular GitHub repositories that depend on YamlDotNet:
| Repository | Stars |
|---|---|
|
2dust/v2rayN
A GUI client for Windows, Linux and macOS, support Xray and sing-box and others
|
|
|
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
|
|
|
Devolutions/UniGetUI
UniGetUI: The Graphical Interface for your package managers. Could be terribly described as a package manager manager to manage your package managers
|
|
|
bitwarden/server
Bitwarden infrastructure/backend (API, database, Docker, etc).
|
|
|
Jackett/Jackett
API Support for your favorite torrent trackers
|
|
|
MonoGame/MonoGame
One framework for creating powerful cross-platform games.
|
|
|
babalae/better-genshin-impact
📦BetterGI · 更好的原神 - 自动拾取 | 自动剧情 | 全自动钓鱼(AI) | 全自动七圣召唤 | 自动伐木 | 自动刷本 | 自动采集/挖矿/锄地 | 一条龙 | 全连音游 | 自动烹饪 - UI Automation Testing Tools For Genshin Impact
|
|
|
JosefNemec/Playnite
Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.
|
|
|
Kareadita/Kavita
Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
|
|
|
unoplatform/uno
Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
|
|
|
dotnet/yarp
A toolkit for developing high-performance HTTP reverse proxy applications.
|
|
|
AutoDarkMode/Windows-Auto-Night-Mode
Automatically switches between the dark and light theme of Windows 10 and Windows 11
|
|
|
gitextensions/gitextensions
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
|
|
|
LykosAI/StabilityMatrix
Multi-Platform Package Manager for Stable Diffusion
|
|
|
btcpayserver/btcpayserver
Accept Bitcoin payments. Free, open-source & self-hosted, Bitcoin payment processor.
|
|
| beeradmoore/dlss-swapper | |
|
Prowlarr/Prowlarr
Prowlarr is an indexer manager/proxy built on the popular *arr .net/reactjs base stack to integrate with your various PVR apps, supporting management of both Torrent Trackers and Usenet Indexers.
|
|
|
ant-design-blazor/ant-design-blazor
🌈A rich set of enterprise-class UI components based on Ant Design and Blazor.
|
|
|
kurrent-io/KurrentDB
KurrentDB is a database that's engineered for modern software applications and event-driven architectures. Its event-native design simplifies data modeling and preserves data integrity while the integrated streaming engine solves distributed messaging challenges and ensures data consistency.
|
|
|
proxysu/ProxySU
Xray,V2ray,Trojan,NaiveProxy, Trojan-Go, ShadowsocksR(SSR),Shadowsocks-libev及相关插件,MTProto+TLS 一键安装工具,windows下用(一键科学上网)
|
| Version | Downloads | Last Updated |
|---|---|---|
| 18.0.0 | 638,800 | 5/21/2026 |
| 17.1.0 | 801,894 | 4/28/2026 |
| 17.0.1 | 964,215 | 4/10/2026 |
| 17.0.0 | 38,067 | 4/9/2026 |
| 16.3.0 | 70,769,915 | 12/23/2024 |
| 16.2.1 | 6,750,998 | 12/1/2024 |
| 16.2.0 | 16,643,545 | 11/10/2024 |
| 16.1.3 | 4,169,798 | 9/26/2024 |
| 16.1.2 | 1,388,731 | 9/13/2024 |
| 16.1.1 | 27,528 | 9/13/2024 |
| 16.1.0 | 591,180 | 9/1/2024 |
| 16.0.0 | 13,981,069 | 7/14/2024 |
| 15.3.0 | 4,783,286 | 6/16/2024 |
| 15.1.6 | 1,015,326 | 5/29/2024 |
| 15.1.4 | 14,223,799 | 5/11/2024 |
| 15.1.2 | 6,673,413 | 2/26/2024 |