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.
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle
dmstr/api-platform-utils-bundle
dmstr/api-configuration-bundle
chrisdev/ux-components
baks-dev/finances
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle