PHPackages                             niobe/ezytoon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. niobe/ezytoon

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

niobe/ezytoon
=============

Ultra-efficient PHP encoder for TOON format. Drastically compress your data structures to minimize token counts and slash costs in AI prompts.

1.0.0(2mo ago)00MITPHPPHP &gt;=8.4

Since May 23Pushed 2mo agoCompare

[ Source](https://github.com/coding-elena/ezytoon)[ Packagist](https://packagist.org/packages/niobe/ezytoon)[ RSS](/packages/niobe-ezytoon/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

EzyToon
=======

[](#ezytoon)

**EzyToon** is a high-performance PHP 8.4+ encoder for the **Token-Oriented Object Notation (TOON)** format (spec v3.3). TOON is designed to be more compact than JSON while remaining human-readable, specifically optimizing for tabular data and nested object structures.

Reference:

Features
--------

[](#features)

- **High Compression**: Significant byte savings compared to JSON (often &gt;50%).
- **Tabular Optimization**: Automatically detects uniform collections and encodes them with a header and delimiter-separated rows.
- **Key Folding**: Optional flattening of single-key nested object chains.
- **Strict Adherence**: Implements full quoting rules (§7) and spec-compliant normalization (ISO 8601 dates, signed zero, etc.).
- **Modern PHP**: Leverages PHP 8.4 features like readonly property promotion.

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
composer require niobe/ezytoon
```

### Manual Installation

[](#manual-installation)

If you are not using Composer, download the source and include the file directly:

```
require_once 'src/EzyToon.php';
```

Usage
-----

[](#usage)

### Using Composer Autoload (Recommended)

[](#using-composer-autoload-recommended)

```
