PHPackages                             finagin/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. finagin/json

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

finagin/json
============

JSON class with throw exception

1.0.3(5y ago)013MITPHPPHP &gt;=7.3

Since Feb 4Pushed 5y ago1 watchersCompare

[ Source](https://github.com/finagin/json)[ Packagist](https://packagist.org/packages/finagin/json)[ RSS](/packages/finagin-json/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

JSON class for PHP 7.3 and up
=============================

[](#json-class-for-php-73-and-up)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e5f28c88d25c698be61ff9bbfcb2eeac1aa6679a81c379b85b0c2a0125dcffc2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f66696e6167696e2f6a736f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/finagin/json)[![StyleCI](https://camo.githubusercontent.com/191df45f22bd84e9aa87758979d98fb92faef5b68a231b2af48b6dd0b4368599/68747470733a2f2f7374796c6563692e696f2f7265706f732f3333353931303038332f736869656c64)](https://styleci.io/repos/335910083)[![Total Downloads](https://camo.githubusercontent.com/0584f5bff6b8582d8185dae6caf4b563b22b3fb47fc1d33b0f9bc7b54063b18a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f66696e6167696e2f6a736f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/finagin/json)[![](https://camo.githubusercontent.com/7123c32787e013be5a8a13598ad01f562754637ed6141e89b02e85bf16d3e63e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e7376673f7374796c653d666c61742d737175617265)](https://github.com/finagin/json/blob/master/LICENSE)
[![GitHub stars](https://camo.githubusercontent.com/1226fb010884f2f9c9241b18b98190a8ae802a2cde28be5b0424b4bd73990947/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f66696e6167696e2f6a736f6e2e7376673f7374796c653d736f6369616c266c6162656c3d53746172)](https://github.com/finagin/json)

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

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

[](#installation)

This package can be used with PHP 7.3 or higher. You can install the package via composer:

```
composer require finagin/json
```

Usage
-----

[](#usage)

```
use Finagin\Json\Facades\Json;

try {
    // decode as object
    Json::decode($fromJson);
    Json::decodeAsObject($fromJson);

    // decode as array
    Json::decode($fromJson, 0, true);
    Json::decodeAsArray($fromJson);

    Json::encode($toJson, JSON_PRETTY_PRINT);
} catch (\JsonException $exception) {
    //
}
```

License
-------

[](#license)

The MIT License ([MIT](https://opensource.org/licenses/MIT)). Please see [License File](https://github.com/finagin/json/blob/master/LICENSE) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~0 days

Total

4

Last Release

1928d ago

### Community

Maintainers

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

---

Top Contributors

[![finagin](https://avatars.githubusercontent.com/u/11045296?v=4)](https://github.com/finagin "finagin (11 commits)")

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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