johnstevenson/json-works
A PHP library for reading, editing, and writing JSON while preserving original formatting and whitespace. It provides a simple API for precise changes to JSON documents, making it ideal for configuration files and other human-maintained JSON that should stay readable.
composer.json, manifests, CI templates, or editor settings.json_decode/json_encode is cheap but destroys indentation, key order, and line endings. This package is a buy candidate when stable diffs are user-visible; otherwise it is an unnecessary dependency.json_decode/json_encode is simpler, better supported, and easier to reason about.Executive summary: This package solves a narrow but real tooling problem: editing JSON files without reformatting them. That reduces noisy diffs, avoids accidental churn in hand-maintained configs, and can save engineering time versus building a format-preserving JSON editor in-house. It is MIT-licensed, pure PHP, and low deployment friction.
Engineering summary: Use it as a tactical tool for targeted config edits via JSON Pointer, especially where composer.json-style files or developer-maintained JSON must survive round trips. The trade-off is ecosystem risk: small community, modest adoption signals, and no release since April 2023. Recommended path is a short spike behind an internal abstraction; adopt only for low-risk, formatting-sensitive workflows, and avoid making it a core dependency for security-critical or long-lived platform surfaces.
How can I help you explore Laravel packages today?