Weave Code
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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor