YamlConvert 2.1.1

dotnet add package YamlConvert --version 2.1.1                
NuGet\Install-Package YamlConvert -Version 2.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YamlConvert" Version="2.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add YamlConvert --version 2.1.1                
#r "nuget: YamlConvert, 2.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install YamlConvert as a Cake Addin
#addin nuget:?package=YamlConvert&version=2.1.1

// Install YamlConvert as a Cake Tool
#tool nuget:?package=YamlConvert&version=2.1.1                


YamlConvert is a YamlDotNet extension library which makes it trivially easy to serialize objects to/from YAML honoring JSON.NET attributes

Json.Net attributes

If you have been using JSON.NET you probably already use JsonProperty/JsonIgnore annotations to make your serialization just right. Then you think "why not try this YAML thing...and discover that your JObjects blow up and your annotations are ignored.

This library fixes this by creating a object converter for yamldotnet which understands how to read and write JObject/JArray/JValue objects. Not only that, but it honors the JSON.NET attributes you have painstakingly created.


nuget install YamlConvert


YamlConvert - exposes SerializeObject() and DeserializeObject() methods which work just like JsonConvert, but with YAML

// to serialize to yaml
var yaml = YamlConvert.SerializeObject(someObject);

// to load your object as a JToken
dynamic obj1 = YamlConvert.DeserializeObject(yaml);

// to load your object as a typed object
var obj2 = YamlConvert.DeserializeObject<MyTypedObject>(yaml);


This is a type converter for reading and writing JToken objects. It's automatically used by YamlConvert, but you can add it to your own serializer definition by using .WithTypeConverter(new JTokenYamlConverter())


var serializer = new SerializerBuilder()
            .WithTypeConverter(new JTokenYamlConverter())
var deserializer = new DeserializerBuilder()
            .WithTypeConverter(new JTokenYamlConverter())
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 is compatible. 
.NET Framework net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on YamlConvert:

Package Downloads

Experimental library for creating Adaptive Cards.


Experimental library for creating Adaptive Cards using ASP.NET Blazor component .Razor templates.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.1 38,005 2/18/2022
2.1.0 416 2/18/2022
2.0.0 411 2/15/2022
1.0.1 410 2/15/2022
1.0.0 969 12/21/2021