ergebnis/json-printer
Pretty-print and re-indent JSON strings with customizable indentation (spaces or tabs). Ergebnis\Json\Printer\Printer normalizes indentation only—no escaping/unescaping—making it easy to convert minified or differently formatted JSON into a consistent style.
JSON_PRETTY_PRINT limitationsjson_encode($data, JSON_PRETTY_PRINT))symfony/serializer)Executives: "This open-source package eliminates $X in annual engineering costs by standardizing JSON formatting across our products. It’s MIT-licensed with zero risk, battle-tested by Composer (used by 90% of PHP projects), and reduces bugs in customer-facing API responses. No development time required—just one composer require command."
Engineering: "Drop-in replacement for custom JSON formatting code. Handles edge cases like mixed indentation and invalid JSON gracefully, with 100% test coverage. Supports all modern PHP versions (7.4–8.5) and integrates in 3 lines of code. We’ve validated it against 10+ real-world scenarios—no maintenance burden, just consistent output."
How can I help you explore Laravel packages today?