Install TOON for .NET

TOON is available in multiple languages. Choose your preferred ecosystem and start integrating TOON into your projects today.

In Development

Installation

Add the official Toon.Format package to your project

dotnet add package Toon.Format

Usage Example

Quick start guide for encoding and decoding TOON format in .NET

using Toon.Format;

// Your data structure
var data = new Dictionary<string, object>
{
    { "name", "Alice" },
    { "age", 30 }
};

// Convert to TOON format
var toonString = ToonEncoder.Encode(data);
Console.WriteLine(toonString);
// Output:
// name: Alice
// age: 30

// Convert back to object
var jsonData = ToonDecoder.Decode(toonString);

No code needed to try it: paste data into the JSON to TOON converter, compare token counts in the TOON token calculator, or read the TOON format guide.