YamlDotNet is a .NET library for YAML. 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.
What is YAML?
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 YamlDotNet library
The library has now been successfully used in multiple projects and is considered fairly stable.
Where to get it?
The most up-to-date version can always be found in the following NuGet packages:
YamlDotNet is also available on the Unity Asset Store.
There is also a continuous integration project configured on AppVeyor where you can download the binaries:
You can also clone the project on GitHub if you are interested.
The software is released under the MIT License. Before using this software, you should eead the license, but basically, you are allowed to use the code in any kind of project, commercial or not, provided that you redistribute the license with the software.
If you use this software, I will apreciate if you let me know, but that is not a requirement.
The documentation is lacking. Any help on this matter would be greatly appreciated.
The following is a list of samples that can help you getting started.
Deserializing an object graph
Converting a YAML document to an object graph.
Serializing an object graph
Converting an object to its YAML representation.
Loading a YAML Stream
Explains how to load YAML using the representation model.
Validating during deserialization
By manipulating the list of node deserializers, it is easy to add behavior to the deserializer. This example shows how to validate the objects as they are deserialized.
Deserializing multiple documents
Explains how to load multiple YAML documents from a stream.
A list of selected questions can be consulted in Frequently Asked Questions.