Welcome to ToonNet
ToonNet is a high-performance .NET library for serializing and deserializing data in TOON (Token-Optimized Object Notation) format.
What is TOON?β
TOON is a human-readable data format designed for:
- AI/LLM prompts - Up to 40% fewer tokens than JSON
- Configuration files - Clean, readable syntax
- Data exchange - Human and machine friendly
Quick Exampleβ
using ToonNet.Core;
// Serialize
var person = new Person { Name = "Alice", Age = 30 };
string toon = ToonSerializer.Serialize(person);
// Deserialize
var restored = ToonSerializer.Deserialize<Person>(toon);
Key Featuresβ
- π High Performance - Expression trees, not reflection (10-100x faster)
- π° Token Efficient - 40% fewer tokens than JSON (lower AI API costs)
- π» Developer Friendly - System.Text.Json-compatible API
- π§ ASP.NET Core - Input/output formatters, configuration provider
- π¦ Format Extensions - JSON/YAML bidirectional conversion
- π― Source Generators - Compile-time code generation
Documentation Guideβ
π Getting Startedβ
Start here if you're new to ToonNet:
- Installation - NuGet packages and requirements
- Quick Start - 5-minute tutorial
- Basic Serialization - Fundamental examples
π― Core Featuresβ
Deep dive into ToonNet's core functionality:
- Serialization - Convert objects to TOON
- Deserialization - Convert TOON to objects
- Type System - ToonValue and subclasses
- Configuration - ToonSerializerOptions guide
π Format Extensionsβ
Convert between different data formats:
- JSON Integration - JSON β TOON conversion
- YAML Integration - YAML β TOON conversion
- Custom Formats - Create custom converters
π ASP.NET Coreβ
Integrate ToonNet with ASP.NET Core:
- Dependency Injection - Service configuration
- Input Formatters - Handle TOON requests
- Output Formatters - Return TOON responses
- Configuration Provider - TOON config files
β‘ Advanced Topicsβ
Optimization and customization:
- Performance Tuning - Optimization strategies
- Custom Converters - Type-specific converters
- Source Generators - Compile-time code generation
π Referenceβ
Additional resources:
Quick Linksβ
| Topic | Link |
|---|---|
| Installation | Getting Started |
| First Example | Quick Start |
| API Reference | API Guide |
| GitHub Repository | ToonNet on GitHub |
Community & Supportβ
- GitHub Issues: Report bugs or request features
- Discussions: Ask questions and share ideas
Licenseβ
ToonNet is open-source software licensed under the MIT License.