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

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

jdelta/pretty-json
==================

The new JSON pretty print approach.

v1.0(8y ago)01.2kMITPHPCI passing

Since Apr 18Pushed 8y agoCompare

[ Source](https://github.com/jxcodes/pretty-json)[ Packagist](https://packagist.org/packages/jdelta/pretty-json)[ Docs](https://jdelta.github.io/pretty-json)[ RSS](/packages/jdelta-pretty-json/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

pretty-json
===========

[](#pretty-json)

The new JSON pretty print approach.

Example:

```
require __DIR__ . '/../vendor/autoload.php';

use jDelta\PrettyJson;

$myData = [
    'service_url' => 'http://example.com/api/my-friends',
    'success' => true,
    'data' => [
        ['id'=>1, 'name'=>'Bill Gates', 'age' => 62],
        ['id'=>2, 'name'=>'Elon Musk', 'age' => 46],
        ['id'=>3, 'name'=>'Mark Zuckerberg', 'age' => 33]
    ],
    'total' => 3,
    'response_time' => '0.0014s'
];

//Before
echo '';
echo json_encode($myData, JSON_PRETTY_PRINT);
echo '';

//Now
echo '';
echo PrettyJson::getPrettyPrint(json_encode($myData));
echo '';
```

Result before:
==============

[](#result-before)

```
{
    "service_url": "http:\/\/example.com\/api\/my-friends",
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Bill Gates",
            "age": 62
        },
        {
            "id": 2,
            "name": "Elon Musk",
            "age": 46
        },
        {
            "id": 3,
            "name": "Mark Zuckerberg",
            "age": 33
        }
    ],
    "total": 3,
    "response_time": "0.0014s"
}
```

Result now:
===========

[](#result-now)

```
{
    "service_url": "http://example.com/api/my-friends",
    "success": true,
    "data": [
        {"id": 1, "name": "Bill Gates", "age": 62},
        {"id": 2, "name": "Elon Musk", "age": 46},
        {"id": 3, "name": "Mark Zuckerberg", "age": 33}
    ],
    "total": 3,
    "response_time": "0.0014s"
}
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

2948d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

jsonhorizontalprettyprintjson\_encodeprettyprintJSON\_PRETTY\_PRINT

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/jdelta-pretty-json/health.svg)](https://phpackages.com/packages/jdelta-pretty-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.

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

PHPackages © 2026

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