No. JSON should remain your default for external API transport and cross-system interoperability.
TOON is best for internal human-readable structured text:
Not always. Savings are strongest when payloads have repeated object shapes and repeated field names.
Measure with:
\Sbsaga\Toon\Facades\Toon::diff($payload);
Yes. Toon::decode() and toon_decode() return arrays.
For stricter validation:
Toon::validate($toon, true) before decode--strict for fixture/import checkslegacy: safest for existing production systems and upgradesmodern: recommended for new projects or controlled migrationsUsually no.
Core APIs remain unchanged:
Toon::convert()Toon::encode()Toon::decode()Toon::estimateTokens()New features are additive.
Use a replacer:
Toon::encodeWith($payload, function (array $path, string|int|null $key, mixed $value) {
return in_array($key, ['password', 'token'], true)
? Toon::skip()
: $value;
});
Yes, if you apply redaction and follow normal logging policy.
Recommended:
Use CLI for:
Use facade/helpers for:
Yes:
Toon::encodeLines() for line iterationToon::decodeFromLines() for rebuilding arrays from linesFirst action:
compatibility_mode=legacySee Migration guide and Production playbook.
How can I help you explore Laravel packages today?