Retargeting toon-dotnet to .NET Standard 2.0

Research

TOON (Token-Oriented Object Notation) is a compact data format for feeding structured data to LLMs at lower token cost. The reference .NET library, toon-dotnet, only targeted .NET 8/9 — locking out .NET Framework and older Core/​.NET runtimes. We proposed retargeting it to .NET Standard 2.0, and the fix is now merged upstream.

What changed

Our PR (#20) retargeted the main library from net8.0;net9.0 to netstandard2.0, expanding compatibility to .NET Framework 4.6.1+, .NET Core 2.0+, and every .NET 5–9 release — with no breaking API changes. That meant fixing a string of .NET Standard 2.0 gaps: file-scoped namespaces converted back to block form, nullable-type declarations tightened, BitConverter.SingleToInt32Bits replaced with unsafe code, double.IsFinite/float.IsFinite swapped for IsNaN/ IsInfinity checks, and a malformed regex pattern fixed along the way.

How it landed

The maintainer confirmed the compatibility gap was real and wanted it fixed with a smaller diff surface. They rebased our change onto a new branch and shipped it as PR #28, which explicitly closes both the tracking issue and our PR. It merged 2026-03-12 — the compatibility fix we proposed is what shipped, just carried across the finish line under a cleaner PR.

Get the scripts, benchmark harness & setup guide on GitHub ↗Download only — every result is on this page.

← All research