PHPackages                             matraux/json-orm - 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. [Database &amp; ORM](/categories/database)
4. /
5. matraux/json-orm

ActiveLibrary[Database &amp; ORM](/categories/database)

matraux/json-orm
================

A PHP 8.4+ library for converting JSON data to typed entities and back, with support for lazy-loading collections.

3.0.0(2mo ago)1255MITPHPPHP ^8.4CI passing

Since Mar 12Pushed 1mo ago1 watchersCompare

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

READMEChangelog (3)Dependencies (11)Versions (13)Used By (0)

MATRAUX JSON ORM
================

[](#matraux-json-orm)

[![Latest Version on Packagist](https://camo.githubusercontent.com/84779f82c0403cad017be958a399f894a4fc7634ab5ddb94d25faaf7ef8a49ee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6174726175782f6a736f6e2d6f726d2e7376673f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/matraux/json-orm)[![Last release](https://camo.githubusercontent.com/322f65e033f36f69d3ab0d1cfaa14897d1b69a6fb1e002fce9b45e5660c22e2e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d6174726175782f6a736f6e2d6f726d3f646973706c61795f6e616d653d746167266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](https://github.com/matraux/json-orm/releases)[![License: MIT](https://camo.githubusercontent.com/aaaf7fce1d44e884300a55df2c82406f416bc1e5009859d78aedbb69249e4611/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f6c6f676f3d6f70656e2d736f757263652d696e6974696174697665266c6f676f436f6c6f723d7768697465)](LICENSE)[![PHP](https://camo.githubusercontent.com/2b0538729bedffcc119589c18037b4ebcff0f4d71a1d4320d4904f72dda5810f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342b2d626c75652e7376673f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://php.net)[![Security Policy](https://camo.githubusercontent.com/33427022d3760656f0ff395d8f48f1230d42ba200881fbcc019aabadf2ffabe8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53656375726974792d506f6c6963792d626c75653f6c6f676f3d62697477617264656e266c6f676f436f6c6f723d7768697465)](./.github/SECURITY.md)[![Contributing](https://camo.githubusercontent.com/bd7eaa3d90ef7ad126e208b3b8adf606e0805b6e28c8c38aa16d52fb38ac7fb5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6e747269627574696e672d44697361626c65642d6c69676874677265793f6c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](CONTRIBUTING.md)[![QA Status](https://camo.githubusercontent.com/e6a28c492dffe490978cb07ab4d3b85e41e8da7a6cf3080fd876d839a3392d7e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6174726175782f6a736f6e2d6f726d2f71612e796d6c3f6c6162656c3d5175616c6974792b4173737572616e6365266c6f676f3d636865636b6d617278266c6f676f436f6c6f723d7768697465)](https://github.com/matraux/json-orm/actions/workflows/qa.yml)[![Issues](https://camo.githubusercontent.com/839af7dd3a7f44c418aa3deec4e63b173995d5969dd768c5599a782a44e407df/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d6174726175782f6a736f6e2d6f726d3f6c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](https://github.com/matraux/json-orm/issues)[![Last Commit](https://camo.githubusercontent.com/6e2d0b8b9d31a6e4bedec223e217a95c57cb95173282a212c20828d1fadcb5ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6d6174726175782f6a736f6e2d6f726d3f6c6f676f3d676974266c6f676f436f6c6f723d7768697465)](https://github.com/matraux/json-orm/commits)

Introduction
------------

[](#introduction)

A PHP 8.4+ library for converting JSON data to typed entities and back, with support for lazy-loading collections, mutable data structures, and structured entity design. Useful for structured JSON APIs, configuration parsing, and object-based manipulation of hierarchical JSON data.

Features
--------

[](#features)

- Object-oriented JSON mapping
- Conversion from JSON to typed entities and back
- Lazy-loading collections for efficient memory usage
- Entity objects are mutable and can be freely modified after creation
- Strict type support with automatic casting and codec transformations
- Native support for nested structures and arrays
- Easy integration with configuration or API responses

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

[](#installation)

```
composer require matraux/json-orm
```

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

[](#requirements)

versionPHPNote1.0.07.4+Support PHP 7.42.0.08.3+Support PHP 8.33.0.08.4+Support PHP 8.4
Examples
--------

[](#examples)

See [Definitions](./docs/Definitions.md) for how to define your own entities and collections.

See [Read](./docs/Read.md) for full reading examples.

```
use Matraux\JsonOrm\Json\SimpleExplorer;

// Load data from JSON string or file
$explorer = SimpleExplorer::fromString('[{"CUSTOM_ID":1,"name":"First"}]');

// Create typed collection from JSON
$collection = CommonCollection::fromExplorer($explorer);

$entity = $collection[0];
echo $entity->name; // "First"
```

See [Write](./docs/Write.md) for writing examples.

```
// Create collection and insert entity
$collection = CommonCollection::create();

$entity = $collection->createEntity();
$entity->name = 'Example';

echo json_encode($collection);
// '[{"name":"Example"}]'
```

Development
-----------

[](#development)

See [Development](./docs/Development.md) for debug, test instructions, static analysis, and coding standards.

Support
-------

[](#support)

For bug reports and feature requests, please use the [issue tracker](https://github.com/matraux/json-orm/issues).

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance88

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community7

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

Total

10

Last Release

67d ago

Major Versions

1.4.2 → 2.1.02025-11-25

1.0.0 → 3.0.02026-03-12

PHP version history (3 changes)1.2.0PHP ^8.4

1.0.0PHP ^7.4

2.0.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/5de8dde6b301108e289df5793632663794646f600ad72d94597c78ecba7408ed?d=identicon)[matraux](/maintainers/matraux)

---

Top Contributors

[![matraux](https://avatars.githubusercontent.com/u/46919973?v=4)](https://github.com/matraux "matraux (125 commits)")

---

Tags

json-ormMATRAUX

###  Code Quality

TestsCodeception

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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