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

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

ivory/json-builder
==================

JSON builder with escaping control for PHP 7.0+

3.0.3(5y ago)3313.7k—9.4%3MITPHPPHP ^7.1 || ^8.0

Since Feb 2Pushed 3y agoCompare

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

READMEChangelogDependencies (4)Versions (11)Used By (0)

README
======

[](#readme)

[![Travis Build Status](https://camo.githubusercontent.com/406a3493d662aafcdc9d9b55d07f84318a12f7b77c2f625677de4f8a8b141e15/68747470733a2f2f6170692e7472617669732d63692e636f6d2f62726573616d2f69766f72792d6a736f6e2d6275696c6465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/github/bresam/ivory-json-builder)[![Code Coverage](https://camo.githubusercontent.com/a49627ecef50b29443e05f359d04e631494db479b6795e384532c04ee84179bf/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62726573616d2f69766f72792d6a736f6e2d6275696c6465722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bresam/ivory-json-builder/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0540085954a53f29db533f7ef361c536e56ff856ea397f419ec7264c89f110bc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62726573616d2f69766f72792d6a736f6e2d6275696c6465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bresam/ivory-json-builder/?branch=master)

The Ivory JSON builder is a PHP 7.0+ library allowing you to build your JSON through the Symfony2 [PropertyAccess](http://symfony.com/doc/current/components/property_access/index.html) component while keeping the control of the value escaping.

```
use Ivory\JsonBuilder\JsonBuilder;

$builder = new JsonBuilder();
$json = $builder
    ->setValues(array('foo' => array('bar')))
    ->setValue('[baz]', 'bat', false)
    ->build();

// {"foo":["bar"],"baz":bat}
echo $json;
```

Documentation
-------------

[](#documentation)

- [Installation](/doc/installation.md)
- [Usage](/doc/usage.md)
- [Development Environment](/doc/development_environment.md)

Testing
-------

[](#testing)

The library is fully unit tested by [PHPUnit](http://www.phpunit.de/) with a code coverage close to **100%**. To execute the test suite, check the travis [configuration](/.travis.yml).

Contribution
------------

[](#contribution)

We love contributors! Ivory is an open source project. If you'd like to contribute, feel free to propose a PR! You can follow the [CONTRIBUTING](/CONTRIBUTING.md) file which will explain you how to set up the project.

License
-------

[](#license)

The Ivory JSON Builder is under the MIT license. For the full copyright and license information, please read the [LICENSE](/LICENSE) file that was distributed with this source code.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 93.2% 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 ~294 days

Recently: every ~493 days

Total

10

Last Release

1841d ago

Major Versions

1.0.3 → 2.0.02014-12-29

2.0.1 → 3.0.02017-02-27

PHP version history (4 changes)1.0.0PHP &gt;=5.3.0

3.0.0PHP ^5.6|^7.0

3.0.1PHP ^7.0

3.0.3PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/20f86580574d84af96c7fa8cb679dccb4610564b4019d7a2904b28640656da7a?d=identicon)[bresam](/maintainers/bresam)

---

Top Contributors

[![GeLoLabs](https://avatars.githubusercontent.com/u/149005863?v=4)](https://github.com/GeLoLabs "GeLoLabs (68 commits)")[![bresam](https://avatars.githubusercontent.com/u/52054015?v=4)](https://github.com/bresam "bresam (3 commits)")[![ekyna](https://avatars.githubusercontent.com/u/3483641?v=4)](https://github.com/ekyna "ekyna (1 commits)")[![sdaoudi](https://avatars.githubusercontent.com/u/4227015?v=4)](https://github.com/sdaoudi "sdaoudi (1 commits)")

---

Tags

jsonbuilderEscape

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  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)[egeloen/json-builder

JSON builder with escaping control for PHP 5.6+

965.7M9](/packages/egeloen-json-builder)[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)

PHPackages © 2026

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