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

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

iamjohndev/json-reform
======================

A simple PHP Library that can read and format JSON data.

241PHP

Since Dec 9Pushed 2y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

JsonReform
==========

[](#jsonreform)

A simple PHP library for reading, formatting and getting values of a JSON data.

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

[](#installation)

Install via Composer: `composer require iamjohndev/json-reform:dev-main`

Usage
-----

[](#usage)

```
    use iamjohndev\JSONReform;

    // Read JSON data from a string
    $json = '{"name": "John", "age": 30}';
    $reader = new JSONReform($json);

    // Get a value from the JSON data
    $name = $reader->getValue('name'); // "John"

    // Format the JSON data
    $prettyJson = $reader->format('pretty'); // "{\n    "name": "John",\n    "age": 30\n}"

    // Read JSON data from a file
    $reader = JSONReform::fromFile('data.json');

    // Get a nested value from the JSON data
    $value = $reader->getValue('data.persons.0.name'); // "John"
```

API
===

[](#api)

```
JSONReform::__construct(string $json)
// Creates a new JSONReform instance from a JSON string.

JSONReform::fromFile(string $path)
// Creates a new JSONReform instance from a JSON file.

JSONReform::getValue(string $path, mixed $default = null): mixed
// Gets the value at the specified path in the JSON data.

JsonReform::fromHTTPRequestBody();
// Creates a new JsonReform instance from an HTTP Request Body

JSONReform::format(string $format = 'json'): string
// Returns the JSON string in the specified format.
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% 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.

### Community

Maintainers

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

---

Top Contributors

[![PseudoDevs](https://avatars.githubusercontent.com/u/28098260?v=4)](https://github.com/PseudoDevs "PseudoDevs (12 commits)")[![SnoopyCodeX](https://avatars.githubusercontent.com/u/36133216?v=4)](https://github.com/SnoopyCodeX "SnoopyCodeX (3 commits)")

### Embed Badge

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

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

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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