PHPackages                             francerz/json-tools - 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. francerz/json-tools

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

francerz/json-tools
===================

Tools for encoding and decoding json objects.

v0.1.0(3y ago)06382ISCPHP

Since Dec 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/francerz/php-json-tools)[ Packagist](https://packagist.org/packages/francerz/json-tools)[ RSS](/packages/francerz-json-tools/feed)WikiDiscussions master Synced 3w ago

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

PHP JSON Tools
==============

[](#php-json-tools)

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

[](#installation)

This library may be installed with composer.

```
composer require francerz/sql-tools
```

Usage
-----

[](#usage)

Implementing `JsonMappedInterface` interface into `Student` class.

```
use Francerz\JsonTools\JsonMap;
use Francerz\JsonTools\JsonMappedInterface;

class Student implements JsonMappedInterface
{
    private $studentId;
    private $givenName;
    private $familyName;

    public function getJsonMaps()
    {
        return [
            new JsonMap('id', 'studentId'),
            new JsonMap('given_name', 'givenName'),
            new JsonMap('family_name', 'familyName')
        ];
    }
}
```

Decoding JSON string to object.

```
$json = '{"id":123,"given_name":"John","family_name":"Doe"}';

$student = \Francerz\JsonTools\JsonEncoder::decode($json, Student::class);
```

Decoding JSON string to object's array.

```
$json = '[' .
    '{"id":123,"given_name":"John","family_name":"Doe"},' .
    '{"id":321,"given_name":"Jane","family_name":"Smith"}' .
']';

$students = \Francerz\JsonTools\JsonEncoder::decode($json, Student::class);
```

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

1295d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/630263d156ec44e1d55c3d237fe08354442d0cbe7b257032997d0a649baf1854?d=identicon)[francerz](/maintainers/francerz)

---

Top Contributors

[![francerz](https://avatars.githubusercontent.com/u/10836837?v=4)](https://github.com/francerz "francerz (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[pingpong/generators

Laravel Generators

31239.0k8](/packages/pingpong-generators)

PHPackages © 2026

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