Corvus.Text.Json.Toon
High-performance TOON (Token-Oriented Object Notation) to JSON converter for Corvus.Text.Json.
Install
| Product | Versions |
|---|---|
| .NET | |
| .NET Standard |
README
Corvus.Text.Json.Toon
High-performance TOON (Token-Oriented Object Notation) conversion support for Corvus.Text.Json.
TOON is a compact text format for JSON-shaped data and LLM prompts. It keeps JSON's data model while using indentation and table-style rows to reduce prompt tokens and make uniform arrays easier for AI models to follow. This package converts TOON to the Corvus pooled document model and converts JSON back to TOON while staying UTF-8-first internally.
Installation
dotnet add package Corvus.Text.Json.Toon
Quick start
using Corvus.Text.Json;
using Corvus.Text.Json.Toon;
using ParsedJsonDocument<JsonElement> doc =
ToonDocument.Parse<JsonElement>("name: Alice\nage: 30");
string json = ToonDocument.ConvertToJsonString("name: Alice\nage: 30");
string toon = ToonDocument.ConvertToToonString(doc.RootElement);
Related packages
| Package | Purpose |
|---|---|
| Corvus.Toon.SystemTextJson | TOON converter using System.Text.Json only |
Documentation
See the TOON documentation.
TOON project resources:
| Resource | Link |
|---|---|
| Project site | toonformat.dev |
| Reference implementation | github.com/toon-format/toon |
| Specification | github.com/toon-format/spec |
License
Apache 2.0 - see LICENSE.
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.