psx/json
A lightweight PHP library for parsing and writing JSON. psx/json provides a simple, dependable API for converting between JSON strings and PHP values, making it useful for APIs, configuration files, and data exchange in PSX-based or standalone projects.
PATCH semantics (RFC 6902) instead of bespoke PUT-the-whole-document or custom {op, path, value} dialects your team would otherwise hand-roll and maintain./services/billing/timeout) for reading and overriding specific config nodes — useful for a layered config or per-tenant override model.Consider it when:
Look elsewhere when — and this is the dominant case:
test-op failures before exposing it to untrusted clients. No visible security posture is itself a finding.galbar/jsonpatch, swaggest/json-diff) and, if your service boundary allows it, a maintained non-PHP implementation — the wire format is identical, so this is a low-switching-cost decision that should be judged on maintenance, not features.To executives: This is a small, standards-based building block for two plausible roadmap features — partial API updates and efficient client sync — that would otherwise become bespoke code we own forever. The format is an open RFC, so the choice is reversible: we can swap the implementation without changing the wire contract or the product experience. Recommendation: approve a short spike, not a dependency. The candidate library itself has weak adoption signals, so the pitch is "adopt the standard, evaluate the vendor."
To engineering: RFC 6902 (Patch) and 6901 (Pointer) in a narrow, Apache-2.0 package with no framework lock-in — straightforward to wrap behind a DocumentMutator interface so we can substitute a more actively maintained library later without touching call sites. Open questions for the spike: (1) behavior and error typing on invalid patches and test-op failures, (2) performance on our realistic document sizes, (3) whether we want patch generation (diffing) too — this library applies patches, it doesn't produce them. Please report maintainer health and a fallback recommendation alongside the spike result.
Bottom line for the decision log: treat this package as an input to a standards decision, not a production commitment. The reusable asset is the RFC contract and the interface we design around it.
How can I help you explore Laravel packages today?