egeloen/json-builder

JSON builder with escaping control for PHP 5.6+

Maintainers

👁 egeloen

Package info

github.com/egeloen/ivory-json-builder

pkg:composer/egeloen/json-builder

Statistics

Installs: 5 695 715

Dependents: 10

Suggesters: 0

Stars: 96

Open Issues: 1

3.0.0 2017-02-27 20:18 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 3e70bc681891d8aca88dd72164caea659739f284

  • Eric GELOEN <geloen.eric.woop@gmail.com>

jsonbuilderEscape

This package is not auto-updated.

Last update: 2026-06-16 09:11:29 UTC


README

👁 Travis Build Status
👁 AppVeyor Build status
👁 Code Coverage
👁 Scrutinizer Code Quality
👁 Dependency Status

👁 Latest Stable Version
👁 Latest Unstable Version
👁 Total Downloads
👁 License

The Ivory JSON builder is a PHP 5.6+ library allowing you to build your JSON through the Symfony2 PropertyAccess 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

  1. Installation
  2. Usage

Testing

The library is fully unit tested by PHPUnit with a code coverage close to 100%. To execute the test suite, check the travis configuration.

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 file which will explain you how to set up the project.

License

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