This page is the shortest path from evaluation to a working DevOp.Toon integration.
dotnet add package DevOp.Toon
If you only need shared TOON enums and attributes in DTO projects, use DevOp.Toon.Core instead. Use DevOp.Toon when you need actual runtime behavior such as encoding, decoding, JSON interop, or DI registration.
using DevOp.Toon;
var payload = new
{
Id = 42,
Name = "Widget",
Tags = new[] { "sale", "featured" }
};
string toon = ToonEncoder.Encode(payload);
using DevOp.Toon;
var item = ToonDecoder.Decode<Item>(toon);
using Microsoft.Extensions.DependencyInjection;
using DevOp.Toon;
var services = new ServiceCollection();
services.AddToon();
var provider = services.BuildServiceProvider();
var toon = provider.GetRequiredService<IToonService>();
var service = new ToonService();
string toonPayload = service.Json2Toon("""{"id":42,"name":"Widget"}""");
string jsonPayload = service.Toon2Json(toonPayload);