Installation
NuGet Packages
ToonNet is distributed as a set of NuGet packages. Install the packages you need based on your requirements.
Core Package (Required)
The core package provides TOON serialization and deserialization functionality.
dotnet add package ToonNet.Core
<PackageReference Include="ToonNet.Core" Version="1.0.0" />
Format Extensions (Optional)
JSON Integration
Convert between JSON and TOON formats.
dotnet add package ToonNet.Extensions.Json
<PackageReference Include="ToonNet.Extensions.Json" Version="1.0.0" />
YAML Integration
Convert between YAML and TOON formats.
dotnet add package ToonNet.Extensions.Yaml
<PackageReference Include="ToonNet.Extensions.Yaml" Version="1.0.0" />
ASP.NET Core Integration (Optional)
Configuration Provider
Use TOON files as configuration sources in ASP.NET Core.
dotnet add package ToonNet.AspNetCore
<PackageReference Include="ToonNet.AspNetCore" Version="1.0.0" />
MVC Formatters
Enable TOON format for HTTP requests and responses.
dotnet add package ToonNet.AspNetCore.Mvc
<PackageReference Include="ToonNet.AspNetCore.Mvc" Version="1.0.0" />
Requirements
- .NET 8.0 or later
- C# 12.0 or later (for source generators)
Quick Package Selection Guide
| Scenario | Required Packages |
|---|---|
| Basic TOON serialization | ToonNet.Core |
| JSON ↔ TOON conversion | ToonNet.Core + ToonNet.Extensions.Json |
| YAML ↔ TOON conversion | ToonNet.Core + ToonNet.Extensions.Yaml |
| ASP.NET Core API with TOON | ToonNet.Core + ToonNet.AspNetCore.Mvc |
| TOON config files | ToonNet.Core + ToonNet.AspNetCore |
| Full-featured setup | All packages |
Verify Installation
After installing, verify the installation by checking the package references:
dotnet list package
You should see the ToonNet packages listed.
Next Steps
- Quick Start: Get started with your first TOON serialization
- Basic Serialization: Learn the fundamentals