Weave 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

Json Works Laravel Package

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.

Deep Wiki
Context7

Product Decisions This Supports

  • Feature scoping: Deciding whether “edit configuration files in place” is a product capability worth supporting, versus regenerating files from templates and accepting formatting churn.
  • Roadmap inputs: Relevant to developer tooling, CLI scaffolding, package/config management, migrations, admin/configuration UIs, fixture generation, and any workflow that patches hand-maintained JSON such as composer.json, manifests, CI templates, or editor settings.
  • Build vs. buy: Format-preserving JSON editing is deceptively hard. Native 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.
  • Review/UX decisions: Supports requirements around “no noisy diffs,” “preserve user formatting,” and “make surgical edits through stable JSON Pointer paths” rather than rewriting whole documents.
  • Dependency strategy: The low ecosystem score, 26 stars, and last release in April 2023 suggest treating this as a tactical, narrow dependency—not a strategic platform choice—unless the team accepts vendoring or forking risk.

When to Consider This Package

  • Consider it when the product must mutate existing JSON files that humans maintain and when formatting, key order, whitespace, and line endings are part of the user-visible diff quality.
  • Good fit when JSON Pointer (RFC 6901) targeted updates are enough and you do not need a full document object model, JSON Schema validation platform, or comment-preserving JSONC/JSON5 support.
  • Reasonable when the stack is PHP, the team values MIT licensing and pure-PHP deployment, and the use case is internal tooling or config patching with limited blast radius.
  • Evaluate with a time-boxed spike against representative files: round-trip formatting, line endings, nested arrays, escaped pointer segments, duplicate-key behavior, malformed-input errors, and PHP-version compatibility.
  • Look elsewhere if you need active maintenance guarantees, security-critical parsing of untrusted input, enterprise support, JSONC/JSON5/comments, streaming or very large files, or a well-supported long-term vendor dependency.
  • Also look elsewhere if formatting fidelity is not actually a product requirement—native json_decode/json_encode is simpler, better supported, and easier to reason about.
  • If adopted, guardrails matter: pin the version, wrap it behind an internal adapter, add regression tests for formatting-sensitive cases, and keep a fallback path or fork plan.

How to Pitch It (Stakeholders)

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.

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.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log