PHPackages                             stefna/json-pointer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. stefna/json-pointer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

stefna/json-pointer
===================

2.8.1(6mo ago)08.2k↓44.1%11MITPHPPHP ^8.2CI passing

Since Jan 24Pushed 6mo ago3 watchersCompare

[ Source](https://github.com/stefna/json-pointer)[ Packagist](https://packagist.org/packages/stefna/json-pointer)[ RSS](/packages/stefna-json-pointer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (15)Used By (1)

JSONPointer
===========

[](#jsonpointer)

[![Build Status](https://github.com/stefna/json-pointer/actions/workflows/continuous-integration.yml/badge.svg?branch=main)](https://github.com/stefna/json-pointer/actions/workflows/continuous-integration.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/cac82261aeeedc4a13f7b885e24cb5a3d97210d0f9da73a9dad56011ce754b4f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737465666e612f6a736f6e2d706f696e7465722e737667)](https://packagist.org/packages/json-pointer)[![Software License](https://camo.githubusercontent.com/40180cf9923c4e8d48f541c8ae62bb967b3ec4877f3f35ff714fb636e07f4f6b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f737465666e612f6a736f6e2d706f696e7465722e737667)](LICENSE.md)

JSON Pointer implementation

Inspired by

Requirements
------------

[](#requirements)

PHP 8.2 or higher.

Installation
------------

[](#installation)

```
composer require stefna/json-pointer

```

Usage
=====

[](#usage)

Test if document has pointer
----------------------------

[](#test-if-document-has-pointer)

```
$document = [
	"foo" => ["bar", "baz"],
	"qux" => "quux"
];

$document = new \JsonPointer\BasicDocument('test', $document);

var_dump($document->has('/foo'));

var_dump($document->has('/foo/bar'));

/* Results:

bool(true)
bool(false)

*/
```

Retrieving value form document
------------------------------

[](#retrieving-value-form-document)

```
$document = [
	"foo" => ["bar", "baz"],
	"qux" => "quux"
];

$document = new \JsonPointer\BasicDocument('test', $document);

var_dump($document->get('/foo'));

var_dump($document->get('/foo/bar'));

/* Result

array(2) {
  [0] =>
  string(3) "bar"
  [1] =>
  string(3) "baz"
}

Throws JSONPointer\Exceptions\Reference - Referenced element does not exist: bar

*/
```

Contribute
----------

[](#contribute)

We are always happy to receive bug/security reports and bug/security fixes

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance67

Regular maintenance activity

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 94.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~50 days

Recently: every ~82 days

Total

14

Last Release

195d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce9d40996574fd1f18f69556c872c6eb94e59977c5f0b33c9df541d82fbb3800?d=identicon)[sunkan](/maintainers/sunkan)

---

Top Contributors

[![sunkan](https://avatars.githubusercontent.com/u/568492?v=4)](https://github.com/sunkan "sunkan (37 commits)")[![Marrikulus](https://avatars.githubusercontent.com/u/15344566?v=4)](https://github.com/Marrikulus "Marrikulus (1 commits)")[![runar-stefna](https://avatars.githubusercontent.com/u/171600457?v=4)](https://github.com/runar-stefna "runar-stefna (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/stefna-json-pointer/health.svg)

```
[![Health](https://phpackages.com/badges/stefna-json-pointer/health.svg)](https://phpackages.com/packages/stefna-json-pointer)
```

###  Alternatives

[mihanentalpo/fio-analyzer

Analyze user input string, and split it into Russian first name, second name and last name

1422.9k](/packages/mihanentalpo-fio-analyzer)[kris/laravel4-form-builder

Laravel form builder - symfony like

229.3k](/packages/kris-laravel4-form-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
