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

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

inerciacreativa/json
====================

PHP class for working with JSON objects

v1.0.0(3y ago)05MITPHPPHP &gt;=8.0

Since May 4Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

IC JSON
=======

[](#ic-json)

The package provides methods to encode and decode JSON.

- It has sensible defaults, so you don't have to specify flags all the time.
- It has handy method to encode for HTML safely.
- It throws `\IC\Json\Exception\JsonEncodeException` when encoding fails.
- It throws `\IC\Json\Exception\JsonDecodeException` when decoding fails.
- It handles `\JsonSerializable`, `\DateTimeInterface`, and `\SimpleXMLElement` well.

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

[](#requirements)

- PHP 8.0 or higher.
- `SimpleXML` PHP extension.

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

[](#installation)

The package could be installed with composer:

```
composer require inerciacreativa/json --prefer-dist
```

General usage
-------------

[](#general-usage)

Encoding:

```
use \IC\Json\Json;

$data = ['name' => 'Jose', 'team' => 'Inercia Creativa'];
$json = Json::encode($data);
```

Encoding for HTML:

```
use \IC\Json\Json;

$data = ['name' => 'Jose', 'team' => 'Inercia Creativa'];
$json = Json::htmlEncode($data);
```

Decoding:

```
use \IC\Json\Json;

$json = '{"name":"Jose","team":"Inercia Creativa"}';
$data = Json::decode($json);
```

Testing
-------

[](#testing)

### Unit testing

[](#unit-testing)

The package is tested with [PHPUnit](https://phpunit.de/). To run tests:

```
composer phpunit
```

### Static analysis

[](#static-analysis)

The code is statically analyzed with [PHPStan](https://phpstan.org/). To run static analysis:

```
composer phpstan
```

License
-------

[](#license)

The IC JSON is free software. It is released under the terms of the MIT License. Please see [`LICENSE`](./LICENSE) for more information.

Maintained by [Inercia Creativa](https://inerciacreativa.com/).

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

1100d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/81e014159e9b6b0c7f643182caf8fda4980a32fa762c1c61883face0cc6ee1c9?d=identicon)[inerciacreativa](/maintainers/inerciacreativa)

---

Top Contributors

[![inerciacreativa](https://avatars.githubusercontent.com/u/1984550?v=4)](https://github.com/inerciacreativa "inerciacreativa (7 commits)")

---

Tags

phpjson

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[adhocore/json-fixer

Fix/repair truncated JSON data

51543.2k2](/packages/adhocore-json-fixer)[m1/vars

Vars is a simple to use and easily extendable configuration loader with in built loaders for ini, json, PHP, toml, XML and yaml/yml file types. It also comes with in built support for Silex and more frameworks to come soon.

69124.2k1](/packages/m1-vars)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[blancks/fast-jsonpatch-php

Class designed to efficiently handle JSON Patch operations in accordance with the RFC 6902 specification

396.4k](/packages/blancks-fast-jsonpatch-php)[josantonius/json

PHP simple library for managing Json files.

1621.6k10](/packages/josantonius-json)

PHPackages © 2026

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