PHPackages                             mateodioev/jsondecoder - 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. mateodioev/jsondecoder

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

mateodioev/jsondecoder
======================

Json decoder, encoder

v1.2.1(3y ago)1201MITPHPPHP &gt;=8.1

Since Jan 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Mateodioev/php-jsondecoder)[ Packagist](https://packagist.org/packages/mateodioev/jsondecoder)[ RSS](/packages/mateodioev-jsondecoder/feed)WikiDiscussions main Synced today

READMEChangelog (5)DependenciesVersions (6)Used By (1)

JSON decoder
============

[](#json-decoder)

Decode a json string into a class

First step
----------

[](#first-step)

```
composer require mateodioev/jsondecoder
```

```
use Mateodioev\Json;
```

Usage
-----

[](#usage)

Create a class with public atributes, egg:

```
class User {
	public int $id;
	public string $name;
	public string $username;
}
```

### Create a new instance of JSON class with json raw

[](#create-a-new-instance-of-json-class-with-json-raw)

```
$jsonRaw = '{"id": 1, "name": "Mateo", "username": "mateodioev"}';
$json = new JSON($jsonRaw);
```

### Decode content

[](#decode-content)

```
$u = new User;

$json->decode($u)
```

Now var `$u` containts content of `$jsonRaw`

```
var_dump($u);
```

example output:

```
class User#2 (3) {
  public int $id =>
  int(1)
  public string $name =>
  string(5) "Mateo"
  public string $username =>
  string(10) "mateodioev"
}

```

Exceptions
----------

[](#exceptions)

```
Mateodioev\Json\JsonDecodeException
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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 ~3 days

Total

5

Last Release

1241d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/68271130?v=4)[Mateo Ore](/maintainers/Mateodioev)[@Mateodioev](https://github.com/Mateodioev)

---

Top Contributors

[![Mateodioev](https://avatars.githubusercontent.com/u/68271130?v=4)](https://github.com/Mateodioev "Mateodioev (10 commits)")

### Embed Badge

![Health badge](/badges/mateodioev-jsondecoder/health.svg)

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

###  Alternatives

[jacopo/bootstrap-3-table-generator

Dynamic table generator for bootstrap 3

1411.7k1](/packages/jacopo-bootstrap-3-table-generator)

PHPackages © 2026

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