PHPackages                             jedkirby/json - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. jedkirby/json

ActiveProject[Parsing &amp; Serialization](/categories/parsing)

jedkirby/json
=============

0.1.0(7y ago)0245.5k—6%2MITPHPPHP &gt;=7.0.0

Since Apr 17Pushed 6y agoCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (2)

Simple JSON Parsing
-------------------

[](#simple-json-parsing)

This package is designed to bridge the gap between the default `json_*` methods, ensuring a fluent and easy to use structure.

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

[](#installation)

This package can be installed via \[Composer\]:

```
$ composer require jedkirby/json
```

It requires **PHP &gt;= 7.0.0**.

Usage
-----

[](#usage)

The following guide assumes that you've imported the class `Jedkirby\Json` into your namespace.

The `Json` constructor requires you to pass the exact same methods as the [`json_decode`](https://www.php.net/manual/en/function.json-decode.php) method, however, is provides additional functionality once initilised.

The following code should help explain using this package, thus providing the fluent and easy to use structure:

```
$json = new Json('{"name":"James Kirby"}');

if (false === $json->isValid()) {
    throw new RuntimeException(sprintf(
        'Parsing failed with error "%s"',
        $json->getErrorMessage()
    ));
}

return $json->getResponse();

```

Helpers
-------

[](#helpers)

There's a couple of helper methods built in, which provide additional functionality, these are listed below:

MethodDescription`Json::decode()`Alias for the `new Json()` method, passing the same arguments.`Json::decodeFromPath()`Helper to read contents from a provided `$path`, which is the first argument instead of a JSON string.Testing
-------

[](#testing)

Unit tests can be run within the package, however, it utilises [Docker](https://www.docker.com/community-edition) &amp; [Docker Compose](https://docs.docker.com/compose/install):

```
$ docker-compose -f ./docker-compose.yml run --rm cli php ./vendor/bin/phpunit
```

License
-------

[](#license)

**jedkirby/json** is licensed under the MIT license. See the [LICENSE](LICENSE) file for more details.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2588d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/67bc6fe497fd992d8dadbf6b3248aaf5651cfd020c3d435e8c2c9a209c2bc43b?d=identicon)[jedkirby](/maintainers/jedkirby)

---

Top Contributors

[![jedkirby](https://avatars.githubusercontent.com/u/1528691?v=4)](https://github.com/jedkirby "jedkirby (1 commits)")

---

Tags

jsonphpjson

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[justinrainbow/json-schema

A library to validate a json schema.

3.6k316.9M612](/packages/justinrainbow-json-schema)[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[colinodell/json5

UTF-8 compatible JSON5 parser for PHP

30422.2M45](/packages/colinodell-json5)[clue/ndjson-react

Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.

15467.7M16](/packages/clue-ndjson-react)

PHPackages © 2026

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