ergebnis/json-pointer
RFC 6901 JSON Pointer abstraction for PHP. Create and convert reference tokens and pointers between plain strings, JSON strings, and URI fragment identifiers, handling proper escaping/encoding. Install via Composer: ergebnis/json-pointer.
/user/profile/address).Specification for conditional logic).#/user/123).Specification (e.g., "pointer must match /api/v1/*").JsonPointer::fromString() vs. manual string splitting).Specification::closure())./).json_decode() + manual string paths).DOMDocument or SimpleXML).jsonpointer npm package).For Executives:
"This package standardizes JSON pointer handling in our Laravel stack, reducing bugs in API/data navigation (e.g., /user/profile) while supporting URI deep linking and validation rules. It’s a lightweight, MIT-licensed dependency with active PHP 8.5 support, aligning with our tech roadmap for dynamic data access."
For Engineers:
*"Replace ad-hoc string splitting for JSON paths with JsonPointer—a type-safe, RFC 6901-compliant abstraction. Key benefits:
/, ~, emojis) via ReferenceToken.#/path), and Specification rules.Specification for custom validation (e.g., anyOf(), not()).explode('/', $path) with JsonPointer::fromString('/user/123')->append('profile')."*How can I help you explore Laravel packages today?