PHPackages                             digitalcorehub/laravel-toon - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. digitalcorehub/laravel-toon

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

digitalcorehub/laravel-toon
===========================

A friendly JSON transformer for Laravel — Convert JSON ↔ TOON, an ultra-minimal, line-based data format.

0.6(5mo ago)1294↓50%MITPHPPHP ^8.3CI passing

Since Nov 15Pushed 2mo agoCompare

[ Source](https://github.com/DigitalCoreHub/laravel-toon)[ Packagist](https://packagist.org/packages/digitalcorehub/laravel-toon)[ RSS](/packages/digitalcorehub-laravel-toon/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (9)Used By (0)

Laravel Toon
============

[](#laravel-toon)

A lightweight Laravel package that converts standard JSON into **TOON** format - a human-readable, ultra-minimal, line-based data format.

[![Latest Version](https://camo.githubusercontent.com/1bd6c820b37e968ddeb7eb51b4b8c6dc2f593d4650417a663f6108a97037bd87/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e362e302d626c75652e737667)](https://github.com/digitalcorehub/laravel-toon)[![Laravel](https://camo.githubusercontent.com/73692ab0f1fac2901149539199fa738ac249d6cd2387048e8063666cfab3d736/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e7825323025374325323031312e7825323025374325323031322e782d7265642e737667)](https://laravel.com)[![PHP](https://camo.githubusercontent.com/89899a77bdce65fc4c3d3423dfacff9c6461066a0b5354dc18d7721c23ba596e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d626c75652e737667)](https://php.net)

**🇹🇷 [Türkçe Dokümantasyon için tıklayın](README_TR.md)**

Features
--------

[](#features)

- ✅ Convert JSON to TOON format
- ✅ Ultra-minimal, human-readable output
- ✅ Preserves JSON key ordering
- ✅ Supports nested arrays and objects
- ✅ CLI command for file conversion
- ✅ Laravel Facade support
- ✅ Full test coverage

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

[](#installation)

Install the package via Composer:

```
composer require digitalcorehub/laravel-toon
```

The package will automatically register its service provider and facade.

Requirements
------------

[](#requirements)

- PHP 8.3 or higher
- Laravel 10.x, 11.x, or 12.x

Usage
-----

[](#usage)

### Helper Functions

[](#helper-functions)

The package provides global helper functions for easy access:

```
// Encode to TOON
$toon = toon_encode(['id' => 1, 'name' => 'Test']);
// or
$toon = toon_encode('{"id": 1, "name": "Test"}');

// Decode from TOON
$array = toon_decode("id, name;\n1, Test");
```

### Using the Facade

[](#using-the-facade)

```
use DigitalCoreHub\Toon\Facades\Toon;

// Encode from array
$json = [
    'id' => 1,
    'name' => 'Test Product',
    'price' => 99.99
];

$toon = Toon::encode($json);
// Output:
// id, name, price;
// 1, Test Product, 99.99
```

### Fluent Interface

[](#fluent-interface)

The package supports a fluent builder-style API:

```
// From JSON string
$toon = Toon::fromJson('{"id": 1, "name": "Test"}')->encode();

// From array
$toon = Toon::fromArray(['id' => 1, 'name' => 'Test'])->encode();

// From TOON string
$array = Toon::fromToon("id, name;\n1, Test")->decode();
```

The fluent interface is especially useful for method chaining and readability.

### Encode from JSON String

[](#encode-from-json-string)

```
$jsonString = '{"id": 1, "name": "Test Product", "price": 99.99}';
$toon = Toon::encode($jsonString);
```

### Arrays with Objects

[](#arrays-with-objects)

```
$json = [
    'reviews' => [
        [
            'id' => 1,
            'customer' => 'John Doe',
            'rating' => 5
        ],
        [
            'id' => 2,
            'customer' => 'Jane Smith',
            'rating' => 4
        ]
    ]
];

$toon = Toon::encode($json);
// Output:
// reviews[2]{
//   id, customer, rating;
//   1, John Doe, 5
//   2, Jane Smith, 4
// }
```

### Nested Structures

[](#nested-structures)

```
$json = [
    'product' => 'Laptop',
    'specs' => [
        'cpu' => 'Intel i7',
        'ram' => '16GB'
    ],
    'reviews' => [
        ['id' => 1, 'rating' => 5],
        ['id' => 2, 'rating' => 4]
    ]
];

$toon = Toon::encode($json);
```

### Blade Directive

[](#blade-directive)

Use the `@toon()` directive in your Blade templates to display TOON output:

```
@toon($data)
```

The directive automatically:

- Encodes the data to TOON format
- Wraps it in a `` tag
- Escapes HTML for safe output

**Example:**

```

    @toon(['id' => 1, 'name' => 'Test Product', 'price' => 99.99])

```

**Output:**

```

    id, name, price;
1, Test Product, 99.99

```

### Logging Support

[](#logging-support)

Log data in TOON format using the `Log::toon()` macro:

```
use Illuminate\Support\Facades\Log;

$data = ['id' => 1, 'name' => 'Test'];
Log::toon($data); // Logs at 'info' level

// Specify log level
Log::toon($data, 'debug');

// Specify channel
Log::toon($data, 'info', 'daily');
```

The macro encodes your data to TOON format and logs it through Laravel's logging system.

### Console Styling

[](#console-styling)

Get colored TOON output for console/terminal:

```
use DigitalCoreHub\Toon\Facades\Toon;

$data = ['id' => 1, 'name' => 'Test', 'active' => true];
$colored = Toon::console($data, $output); // $output is optional OutputInterface

// In Artisan commands
$this->line(Toon::console($data, $this->output));
```

**Syntax Highlighting:**

- Keys: Yellow
- Strings: Green
- Numbers: Blue
- Booleans: Magenta
- Brackets: Cyan

### Laravel Debugbar Integration

[](#laravel-debugbar-integration)

If you have [Laravel Debugbar](https://github.com/barryvdh/laravel-debugbar) installed, the package automatically registers a TOON panel that shows:

- Recent encode/decode operations
- Performance timing (duration in milliseconds)
- Metadata (key count, row count, line count)
- Input/output preview

The integration is **automatic** - no configuration needed. If Debugbar is not installed, the package works normally without it.

**Note:** Debugbar integration is optional and does not affect package functionality if Debugbar is not installed.

### Streaming Encoder

[](#streaming-encoder)

For large JSON files, use the streaming encoder to avoid loading everything into memory:

```
use DigitalCoreHub\Toon\Facades\Toon;

// Encode large JSON file to TOON format
Toon::encodeStream('storage/large.json', 'storage/large.toon');

// Support for Laravel Storage disks
Toon::encodeStream('local:data.json', 'local:data.toon');
```

The streaming encoder:

- Reads JSON file efficiently
- Writes TOON output progressively
- Reduces memory usage for large files
- Supports both local paths and Laravel Storage disks

### Lazy Encoder

[](#lazy-encoder)

Get TOON output line by line using a generator:

```
use DigitalCoreHub\Toon\Facades\Toon;

$data = ['id' => 1, 'name' => 'Test', 'items' => [1, 2, 3]];

// Generate lines one by one
foreach (Toon::lazy($data) as $line) {
    echo $line . "\n";
}

// Or write directly to file
Toon::lazy($data)->toFile('output.toon');

// Or get as array
$lines = Toon::lazy($data)->toArray();
```

Lazy encoder is perfect for:

- Large datasets
- Real-time output
- Memory-constrained environments
- Terminal/console output

### Compact Mode

[](#compact-mode)

Enable compact mode for smaller, faster output:

```
// In config/toon.php
'compact' => true,
```

Compact mode:

- Removes extra whitespace
- Uses minimal separators (no spaces after commas)
- Produces smaller files
- Faster encoding/decoding

**Example:**

```
config(['toon.compact' => true]);

$data = ['id' => 1, 'name' => 'Test'];
$toon = Toon::encode($data);
// Output: id,name;1,Test (no spaces)
```

### Benchmarking

[](#benchmarking)

Measure performance with the benchmark command:

```
php artisan toon:bench tests/bench/large.json
```

The benchmark shows:

- Encode speed (milliseconds)
- Decode speed (milliseconds)
- Memory usage (peak and used)
- Total rows processed
- Total keys processed
- File size comparison

**Example Output:**

```
ENCODE: 87.23 ms
DECODE: 114.56 ms
Memory Peak: 4.3 MB
Memory Used: 2.1 MB
Rows: 220
Keys: 14
TOON Size: 15,432 bytes
JSON Size: 18,765 bytes

```

### Performance Best Practices

[](#performance-best-practices)

1. **Use streaming for large files:**

    ```
    Toon::encodeStream($input, $output); // Memory-efficient
    ```
2. **Enable compact mode in production:**

    ```
    config(['toon.compact' => true]); // Smaller, faster
    ```
3. **Use lazy encoder for real-time output:**

    ```
    foreach (Toon::lazy($data) as $line) {
        // Process line by line
    }
    ```
4. **Monitor performance:**

    ```
    php artisan toon:bench your-file.json
    ```

### Decode TOON to Array

[](#decode-toon-to-array)

```
use DigitalCoreHub\Toon\Facades\Toon;

// Decode from TOON string
$toon = "reviews[1]{
  id, customer, rating, comment, verified;
  101, Alex Rivera, 5, Excellent!, true
}";

$array = Toon::decode($toon);
// Returns:
// [
//     [
//         'id' => 101,
//         'customer' => 'Alex Rivera',
//         'rating' => 5,
//         'comment' => 'Excellent!',
//         'verified' => true
//     ]
// ]
```

### Decode Multiple Rows

[](#decode-multiple-rows)

```
$toon = "reviews[2]{
  id, customer, rating;
  1, Alice, 5
  2, Bob, 4
}";

$array = Toon::decode($toon);
// Returns array with 2 review items
```

### Decode Nested Structures

[](#decode-nested-structures)

```
$toon = "product, reviews;
Laptop
reviews[2]{
  id, customer, rating;
  1, Alice, 5
  2, Bob, 4
}";

$array = Toon::decode($toon);
// Returns:
// [
//     'product' => 'Laptop',
//     'reviews' => [
//         ['id' => 1, 'customer' => 'Alice', 'rating' => 5],
//         ['id' => 2, 'customer' => 'Bob', 'rating' => 4]
//     ]
// ]
```

### Error Handling

[](#error-handling)

The decode method throws `InvalidToonFormatException` for invalid TOON formats:

```
use DigitalCoreHub\Toon\Exceptions\InvalidToonFormatException;
use DigitalCoreHub\Toon\Facades\Toon;

try {
    $array = Toon::decode($toon);
} catch (InvalidToonFormatException $e) {
    // Handle invalid TOON format
    echo "Error: " . $e->getMessage();
}
```

Common errors include:

- Missing semicolons in keys line (with line numbers)
- Mismatched key/value counts (with line numbers)
- Unclosed brackets `{` or `}` (with descriptive messages)
- Invalid array block formats

**Example Error Messages:**

```
// Before: "Mismatched key/value count"
// After: "Key count (4) does not match value count (3) at line 5."

// Before: "Keys line must end with semicolon"
// After: "Missing semicolon in header block at line 2. Found: id, name, price"
```

### Using Dependency Injection

[](#using-dependency-injection)

```
use DigitalCoreHub\Toon\Toon;

class ProductController extends Controller
{
    public function __construct(
        private Toon $toon
    ) {}

    public function export()
    {
        $data = Product::all()->toArray();
        return $this->toon->encode($data);
    }
}
```

CLI Commands
------------

[](#cli-commands)

### Encode: JSON → TOON

[](#encode-json--toon)

Convert JSON files to TOON format using the Artisan command:

```
php artisan toon:encode input.json output.toon
```

**Options:**

- `--preview` or `-p`: Show colored preview of the output

**Example:**

```
# Convert a JSON file
php artisan toon:encode storage/data.json storage/data.toon

# With colored preview
php artisan toon:encode storage/data.json storage/data.toon --preview

# The command will:
# - Read JSON from input.json
# - Convert to TOON format
# - Save to output.toon
# - Show colored preview if --preview flag is used
```

### Decode: TOON → JSON

[](#decode-toon--json)

Convert TOON files to JSON format using the Artisan command:

```
php artisan toon:decode input.toon output.json
```

**Options:**

- `--preview` or `-p`: Show colored preview of the input

**Example:**

```
# Convert a TOON file
php artisan toon:decode storage/data.toon storage/data.json

# The command will:
# - Read TOON from input.toon
# - Convert to JSON format (pretty printed)
# - Save to output.json
# - Display meaningful errors on invalid input
```

**Error Handling:**

If the TOON file has invalid format, the command will display an error message:

```
$ php artisan toon:decode invalid.toon output.json
Invalid TOON format: Keys line must end with semicolon
```

### Benchmark: Performance Testing

[](#benchmark-performance-testing)

Measure TOON encode/decode performance:

```
php artisan toon:bench [file]
```

**Options:**

- `file`: Optional path to JSON file. If not provided, uses first file from `tests/bench/` directory.

**Example:**

```
# Benchmark a specific file
php artisan toon:bench storage/large.json

# Use default benchmark file
php artisan toon:bench
```

The benchmark command displays:

- Encode speed (milliseconds)
- Decode speed (milliseconds)
- Memory usage (peak and used)
- Total rows and keys processed
- File size comparison (TOON vs JSON)

### Store: Save TOON to Laravel Storage

[](#store-save-toon-to-laravel-storage)

Save TOON files using Laravel Storage:

```
php artisan toon:store input.json output.toon --disk=public
```

**Options:**

- `--disk`: The storage disk to use (default: from config `toon.storage.default_disk`)

**Example:**

```
# Store to default disk (local)
php artisan toon:store storage/data.json users.toon

# Store to public disk
php artisan toon:store storage/data.json users.toon --disk=public

# The command will:
# - Read JSON from input.json
# - Convert to TOON format
# - Store via Laravel Storage
# - Print saved file path
```

File Storage &amp; Download
---------------------------

[](#file-storage--download)

### Storing TOON Files

[](#storing-toon-files)

Save TOON data to Laravel Storage:

```
use DigitalCoreHub\Toon\Facades\Toon;

$data = ['id' => 1, 'name' => 'Test'];

// Store to default disk (from config)
$path = Toon::store('my-file', $data);
// Returns: "toon/my-file.toon"

// Store to specific disk
$path = Toon::store('my-file', $data, 'public');
// Returns: "toon/my-file.toon"

// Store with nested path (directory created automatically)
$path = Toon::store('exports/users', $data, 'local');
// Returns: "toon/exports/users.toon"
```

**Features:**

- Automatically adds `.toon` extension if missing
- Creates directories automatically
- Uses default directory from config (`toon.storage.default_directory`)
- Returns full saved file path

**Configuration:**

```
// config/toon.php
'storage' => [
    'default_disk' => 'local',
    'default_directory' => 'toon',
],
```

### Downloading TOON Files

[](#downloading-toon-files)

Download TOON data as a file response:

```
use DigitalCoreHub\Toon\Facades\Toon;

// In a controller
Route::get('/export/users', function () {
    $users = User::all()->toArray();
    return Toon::download('users', $users);
});

// With custom filename
return Toon::download('export-2024-01-01', $data);
```

**Response Headers:**

- `Content-Type: text/toon`
- `Content-Disposition: attachment; filename="users.toon"`

The download method:

- Automatically adds `.toon` extension if missing
- Streams response efficiently
- Sets proper headers for file download

### API Response Macro

[](#api-response-macro)

Return TOON format in API responses:

```
use Illuminate\Support\Facades\Response;

// In a controller
public function index()
{
    $data = Product::all()->toArray();
    return response()->toon($data);
}
```

**Response Headers:**

- `Content-Type: text/toon`

**Example Route:**

```
// routes/api.php
Route::get('/products', function () {
    return response()->toon(Product::all()->toArray());
});
```

The `response()->toon()` macro:

- Encodes data to TOON format
- Sets `Content-Type: text/toon` header
- Returns standard Laravel response

**File Structure:**After storing files, they will be located at:

```
storage/app/toon/*.toon          (default disk: local)
storage/app/public/toon/*.toon     (disk: public)

```

TOON Format Rules
-----------------

[](#toon-format-rules)

The TOON format follows these rules:

1. **Objects**: Keys are listed on the first line, followed by values on the next line

    ```
    id, name, price;
    1, Product Name, 99.99

    ```
2. **Arrays**: Display with size indicator `arrayName[count]{...}`

    ```
    reviews[2]{
      id, customer, rating;
      1, John, 5
      2, Jane, 4
    }

    ```
3. **Minimal Syntax**: Removes unnecessary `{}`, `[]`, commas, and quotes where possible
4. **Order Preservation**: Maintains the original JSON key ordering
5. **Nested Support**: Fully supports nested arrays and objects

Configuration
-------------

[](#configuration)

### Publishing the Configuration File

[](#publishing-the-configuration-file)

To customize the package settings, you need to publish the configuration file to your Laravel application:

```
php artisan vendor:publish --tag=toon-config
```

This command will create a `config/toon.php` file in your Laravel project's `config` directory.

### Configuration File Location

[](#configuration-file-location)

After publishing, the configuration file will be located at:

```
config/toon.php

```

### Configuration Options

[](#configuration-options)

The published configuration file contains the following options:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Indentation
    |--------------------------------------------------------------------------
    |
    | The number of spaces used for indentation in the TOON output.
    |
    */
    'indentation' => 4,

    /*
    |--------------------------------------------------------------------------
    | Key Separator
    |--------------------------------------------------------------------------
    |
    | The separator used between keys in the TOON format.
    |
    */
    'key_separator' => ', ',

    /*
    |--------------------------------------------------------------------------
    | Line Break
    |--------------------------------------------------------------------------
    |
    | The line break character used in the TOON output.
    |
    */
    'line_break' => PHP_EOL,

    /*
    |--------------------------------------------------------------------------
    | Strict Mode
    |--------------------------------------------------------------------------
    |
    | When enabled, decoding will throw exceptions for any formatting issues.
    | When disabled, it will attempt to parse more leniently.
    |
    */
    'strict_mode' => false,

    /*
    |--------------------------------------------------------------------------
    | Preserve Order
    |--------------------------------------------------------------------------
    |
    | Whether to preserve the original JSON key ordering in the output.
    |
    */
    'preserve_order' => true,

    /*
    |--------------------------------------------------------------------------
    | Storage Configuration
    |--------------------------------------------------------------------------
    |
    | Configuration for storing TOON files using Laravel Storage.
    |
    */
    'storage' => [
        'default_disk' => 'local',
        'default_directory' => 'toon',
    ],
];
```

### Using Configuration Values

[](#using-configuration-values)

You can access configuration values in your code:

```
use Illuminate\Support\Facades\Config;

$indentSize = config('toon.indentation');
$preserveOrder = config('toon.preserve_order');
$compact = config('toon.compact');
```

**Note:** The configuration file is optional. If you don't publish it, the package will use default values.

Testing
-------

[](#testing)

Run the test suite:

```
composer test
# or
vendor/bin/phpunit
```

Examples
--------

[](#examples)

### Example 1: Simple Object

[](#example-1-simple-object)

**Input (JSON):**

```
{
  "id": 1,
  "name": "Laptop",
  "price": 1299.99
}
```

**Output (TOON):**

```
id, name, price;
1, Laptop, 1299.99

```

### Example 2: Array of Objects

[](#example-2-array-of-objects)

**Input (JSON):**

```
[
  {
    "id": 1,
    "customer": "Alice",
    "rating": 5
  }
]
```

**Output (TOON):**

```
array[1]{
  id, customer, rating;
  1, Alice, 5
}

```

### Example 3: Complex Nested Structure

[](#example-3-complex-nested-structure)

**Input (JSON):**

```
{
  "product": "Smartphone",
  "reviews": [
    {"id": 1, "customer": "Bob", "rating": 5},
    {"id": 2, "customer": "Charlie", "rating": 4}
  ]
}
```

**Output (TOON):**

```
product, reviews;
Smartphone
reviews[2]{
  id, customer, rating;
  1, Bob, 5
  2, Charlie, 4
}

```

Version
-------

[](#version)

Current version: **v0.6.0**

This version includes:

- ✅ JSON → TOON encoding
- ✅ TOON → JSON decoding
- ✅ **File Storage** - Save TOON files using Laravel Storage (`store`)
- ✅ **Download Support** - Download TOON files as HTTP responses (`download`)
- ✅ **API Response Macro** - `response()->toon()` for API endpoints
- ✅ **Store Command** - `php artisan toon:store` for CLI file storage
- ✅ Streaming encoder for large files (`encodeStream`)
- ✅ Lazy encoder for line-by-line output (`lazy`)
- ✅ Benchmark command (`php artisan toon:bench`)
- ✅ Compact mode for smaller, faster output
- ✅ Experimental streaming decode (`decodeStream`)
- ✅ CLI commands (encode, decode, store) with colored preview
- ✅ Global helper functions (`toon_encode`, `toon_decode`)
- ✅ Fluent interface (`fromJson`, `fromArray`, `fromToon`)
- ✅ Blade directive `@toon()` for easy template integration
- ✅ Laravel Debugbar integration (auto-detected)
- ✅ Log::toon() macro for logging support
- ✅ Console styling with syntax highlighting
- ✅ Configurable formatting (indentation, separators, line breaks)
- ✅ Improved exception messages with line numbers
- ✅ Facade and DI support
- ✅ Comprehensive test coverage
- ✅ Error handling with custom exceptions

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

Credits
-------

[](#credits)

Developed by [DigitalCoreHub](https://github.com/digitalcorehub)

---

**Made with ❤️ for the Laravel community**

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance79

Regular maintenance activity

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 67.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

178d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32592602?v=4)[Batuhan Haymana](/maintainers/1batu)[@1batu](https://github.com/1batu)

---

Top Contributors

[![1batu](https://avatars.githubusercontent.com/u/32592602?v=4)](https://github.com/1batu "1batu (19 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")

---

Tags

data-formatformatterjsonlaravellaravel-packagepackageparserphpjsonlaravelperformancestreamingconverterformatminimaltoondata-format

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/digitalcorehub-laravel-toon/health.svg)

```
[![Health](https://phpackages.com/badges/digitalcorehub-laravel-toon/health.svg)](https://phpackages.com/packages/digitalcorehub-laravel-toon)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[mischasigtermans/laravel-toon

Token-Optimized Object Notation encoder/decoder for Laravel with intelligent nested object handling

13113.1k](/packages/mischasigtermans-laravel-toon)[json-mapper/laravel-package

The JsonMapper package for Laravel

25170.4k3](/packages/json-mapper-laravel-package)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
