Provides support for json pretty printing in php 5.3
PHP
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/Camspiers/JsonPretty
tests
.gitignore
.php_cs
.travis.yml
LICENSE
README.md
composer.json
composer.lock
phpunit.xml.dist

README.md

JSON Pretty

Build Status

This project provides pretty printing for json in php 5.3.

Installation

Make sure the following is present in your composer.json file:

{
    "require": {
        "camspiers/json-pretty": "1.0.*"
    }
}

Then run:

$ composer update

Usage

$jsonPretty = new Camspiers\JsonPretty\JsonPretty;

echo $jsonPretty->prettify(array('test' => 'test'));

Testing

To run the unit tests with phpunit installed globally:

$ phpunit

To run the unit tests with phpunit installed via composer install --dev:

$ vendor/bin/phpunit