Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Toon Laravel Package

sbsaga/toon

View on GitHub
Deep Wiki
Context7

Benchmarks

Benchmark Fixture

This repository includes a reproducible benchmark fixture:

  • benchmarks/fixtures/paginated-users.json

It models a Laravel-style paginated API response with repeated user fields, pagination metadata, and links. The data is synthetic and repository-generated so it is safe to reuse in documentation and demos.

How to Run It

php benchmarks/run.php benchmarks/fixtures/paginated-users.json

Current Result

Output from the current package version:

{
  "fixture": "benchmarks/fixtures/paginated-users.json",
  "json_chars": 2622,
  "toon_chars": 1492,
  "saved_chars": 1130,
  "savings_percent": 43.1,
  "json_tokens_estimate": 656,
  "toon_tokens_estimate": 373,
  "saved_tokens_estimate": 283
}

Methodology

  1. Load the JSON fixture.
  2. Decode it into a PHP array.
  3. Encode it with Toon::diff().
  4. Compare JSON and TOON lengths.
  5. Estimate tokens using the package's dependency-free character heuristic.

Notes

  • The included token estimate is for relative comparison, not billing reconciliation.
  • Results will vary depending on how repetitive your payload shape is.
  • Uniform rows with scalar fields compress best because TOON can render them as compact tables.
  • Sample names, emails, and records in the fixture are synthetic.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
cgv/localized-resource