mirror of
https://github.com/voson-wang/toon.git
synced 2026-01-29 15:24:10 +08:00
feat: use language-agnostic test suite
This commit is contained in:
12
README.md
12
README.md
@@ -2,13 +2,13 @@
|
||||
|
||||
# Token-Oriented Object Notation (TOON)
|
||||
|
||||
[](https://github.com/johannschopplich/toon/actions)
|
||||
[](https://github.com/toon-format/toon/actions)
|
||||
[](https://www.npmjs.com/package/@toon-format/toon)
|
||||
[](./SPEC.md)
|
||||
[](https://github.com/toon-format/spec)
|
||||
[](https://www.npmjs.com/package/@toon-format/toon)
|
||||
[](./LICENSE)
|
||||
|
||||
**Token-Oriented Object Notation** is a compact, human-readable format designed for passing structured data to Large Language Models with significantly reduced token usage. It's intended for LLM input, not output.
|
||||
**Token-Oriented Object Notation** is a compact, human-readable serialization format designed for passing structured data to Large Language Models with significantly reduced token usage. It's intended for LLM input, not output.
|
||||
|
||||
TOON's sweet spot is **uniform arrays of objects** – multiple fields per row, same structure across items. It borrows YAML's indentation-based structure for nested objects and CSV's tabular format for uniform data rows, then optimizes both for token efficiency in LLM contexts. For deeply nested or non-uniform data, JSON may be more efficient.
|
||||
|
||||
@@ -20,7 +20,7 @@ TOON's sweet spot is **uniform arrays of objects** – multiple fields per row,
|
||||
- [Why TOON?](#why-toon)
|
||||
- [Key Features](#key-features)
|
||||
- [Benchmarks](#benchmarks)
|
||||
- [📋 Full Specification](./SPEC.md)
|
||||
- [📋 Full Specification](https://github.com/toon-format/spec/blob/main/SPEC.md)
|
||||
- [Installation & Quick Start](#installation--quick-start)
|
||||
- [CLI](#cli)
|
||||
- [Format Overview](#format-overview)
|
||||
@@ -521,7 +521,7 @@ npx @toon-format/cli data.toon --no-strict -o output.json
|
||||
## Format Overview
|
||||
|
||||
> [!NOTE]
|
||||
> For precise formatting rules and implementation details, see the [SPEC.md](./SPEC.md).
|
||||
> For precise formatting rules and implementation details, see the [full specification](https://github.com/toon-format/spec).
|
||||
|
||||
### Objects
|
||||
|
||||
@@ -980,7 +980,7 @@ Task: Return only users with role "user" as TOON. Use the same header. Set [N] t
|
||||
## Other Implementations
|
||||
|
||||
> [!NOTE]
|
||||
> When implementing TOON in other languages, please follow the [SPEC.md](./SPEC.md) (currently v1.3) to ensure compatibility across implementations. The [TypeScript test suite](./packages/toon/test) provides comprehensive examples of encoding and decoding behavior that can serve as a reference implementation.
|
||||
> When implementing TOON in other languages, please follow the [specification](https://github.com/toon-format/spec/blob/main/SPEC.md) (currently v1.3) to ensure compatibility across implementations. The [conformance tests](https://github.com/toon-format/spec/tree/main/tests) provide language-agnostic test fixtures that validate implementations across any language.
|
||||
|
||||
- **.NET:** [ToonSharp](https://github.com/0xZunia/ToonSharp)
|
||||
- **Crystal:** [toon-crystal](https://github.com/mamantoha/toon-crystal)
|
||||
|
||||
Reference in New Issue
Block a user