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

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

ornament/json
=============

JSON model for the Ornament ORM framework

0.16.0(1y ago)0477[1 PRs](https://github.com/ornament-orm/json/pulls)MITPHPPHP &gt;=8.1

Since Aug 28Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (37)Used By (0)

json
====

[](#json)

JSON helpers for Ornament ORM

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

[](#installation)

```
$ composer require ornament/json
```

Usage
-----

[](#usage)

This packaged provides the `Json` decorator, which automagically calls `json_decode` on a string value (storage drivers usually don't do that for you). The decorator throws a `DomainException` if the string passed is not valid JSON. If the value input is not a string, it is used verbatim.

Additionally, it provides two helpful traits: `SerializeAll` and `SerializeOnlyPublic`. The first makes the property serializable; the second also, but only exposes the public properties.

Caveats
-------

[](#caveats)

While `null` is a valid value to encapsulate in a JSON string, it is assumed that this value is *not* valid. The decoded JSON should be either an object or an array - encoding `null` as JSON in a storage engine just doesn't... make a lot of sense.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance41

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity74

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

Every ~91 days

Recently: every ~443 days

Total

35

Last Release

486d ago

PHP version history (5 changes)0.10.0PHP &gt;=7

0.11.3PHP &gt;=7.1

0.11.6PHP &gt;=7.2

0.12.0PHP &gt;=7.3

0.14.0PHP &gt;=8.1

### Community

Maintainers

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

---

Top Contributors

[![monomelodies](https://avatars.githubusercontent.com/u/260346?v=4)](https://github.com/monomelodies "monomelodies (112 commits)")

### Embed Badge

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

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

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M114](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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