Table of Contents

Namespace Codebelt.Extensions.YamlDotNet

Serialize and deserialize .NET objects to and from YAML with uniform APIs and flexible configuration.

The Codebelt.Extensions.YamlDotNet namespace provides the foundation for YamlDotNet-based YAML formatting across Codebelt, exposing generic serialization/deserialization APIs and low-level emitter helpers for building custom YAML converters.

Availability: .NET 10, .NET 9 and .NET Standard 2.0

Start with: YamlFormatter to serialize and deserialize objects, or use EmitterExtensions to write custom YAML structures.

When to use:

  • Serialize .NET objects to YAML with configurable naming conventions and custom converters
  • Build custom YAML converters for domain types
  • Low-level YAML event writing when emitting complex structures

Related: Codebelt.Extensions.YamlDotNet.Formatters · Codebelt.Extensions.YamlDotNet.Converters

Extension Members

Type Ext Methods
IEmitter ⬇️ WriteStartObject, WriteString, WritePropertyName, WriteValue, WriteEndObject, WriteStartArray, WriteEndArray, WriteObject

Classes

EmitterExtensions

Extension methods for the YamlDotNet.Core.IEmitter interface.

NodeOptions

Configuration options for EmitterExtensions.

ScalarOptions

Configuration options for EmitterExtensions.

YamlConverterFactory

Provides a factory based way to create and wrap an YamlConverter implementation.

YamlSerializerOptions

Configuration options for YamlDotNet.Serialization.SerializerBuilder and YamlDotNet.Serialization.DeserializerBuilder.