Skip to main content

ToonNet

High-performance TOON format serialization for .NET

🚀

âš¡ High Performance

Expression tree-based serialization with zero reflection overhead. 10-100x faster than traditional reflection-based serializers with optimized memory usage and object pooling.

💰

🤖 AI Token Optimized

TOON format uses up to 40% fewer tokens than JSON, reducing AI API costs. Perfect for LLM prompts, AI training data, and agent memory. Human-readable and machine-friendly.

💻

🔧 Developer Friendly

System.Text.Json-compatible API for zero learning curve. Full .NET 8+ support with nullable reference types. Comprehensive documentation and 444+ passing tests.

Quick Example

Get started with ToonNet in seconds. No configuration needed.

// Install via NuGet
dotnet add package ToonNet.Core

// Serialize
var person = new Person 
{ 
  Name = "Alice", 
  Age = 30 
};
string toon = ToonSerializer.Serialize(person);

// Deserialize
var restored = ToonSerializer
  .Deserialize<Person>(toon);

TOON Format Output

Clean, readable, and token-efficient data format.

Name: Alice
Age: 30

// vs JSON (40% more tokens)
{
  "Name": "Alice",
  "Age": 30
}