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

Format and Compatibility

What This Package Optimizes For

This package is a Laravel-first TOON implementation focused on:

  • predictable encode/decode behavior for PHP arrays and JSON payloads
  • readable output for prompts, logs, and snapshots
  • safe round trips for nested data in modern mode
  • a stable public API for Laravel applications

Supported Shapes

The current implementation supports:

  • associative arrays as key/value blocks
  • scalar lists as indented list values
  • uniform scalar object lists as compact TOON tables
  • nested maps and nested lists
  • root-level and nested tables
  • configurable table delimiters
  • strict table validation during decode

Compatibility Modes

Legacy

Legacy mode is the default so package upgrades remain safer for existing applications.

It preserves:

  • lowercased key normalization
  • preview-limited tabular output
  • legacy inline flattening behavior for nested values in scalar-only positions
  • wrapped table structures that older consumers may already expect

Modern

Modern mode is opt-in and is recommended for new projects or controlled migrations.

It favors:

  • full tabular serialization instead of preview truncation
  • safer round trips for nested rows
  • less aggressive key mutation
  • cleaner table decoding

Delimiters

The package supports comma, pipe, tab, or a raw delimiter character through the delimiter config key.

Example:

'delimiter' => 'pipe',

Strict Mode

When strict_mode is enabled, decoding throws an exception if:

  • a table row has the wrong number of cells
  • a table block contains fewer or more rows than declared in the header

Scope Notes

This release improves TOON compatibility for Laravel application data, but it does not claim universal interoperability with every external TOON dialect or every future spec variant.

If you need stable behavior inside a Laravel codebase, the current package guarantees are:

  • tested encode/decode of supported shapes
  • documented modern and legacy behavior
  • fixture-backed benchmark examples
  • explicit migration guidance for changed defaults
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