ghostff / json-formatter
Allows you to pretty-print JSON data in a human-readable format
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 1 218
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: >=5.3.2
This package is auto-updated.
Last update: 2023-05-16 06:55:25 UTC
README
Allows you to pretty-print JSON data in a human-readable format
#Installation
You can download the Latest release version as a standalone, alternatively you can use Composer for optional dependencies such as PHPUnit.
$ composer require ghostff/json-formatter
Or add:
{ "require": { "ghostff/json-formatter": "^1.0" } }
to your composer.json
Usage:
<?php $source = array ( array ( 'points' => 1, 'name' => 'Peter'), array ( 'points' => 5, 'name' => 'Mike'), array ( 'points' => 2, 'name' => 'John Zoo'), array ( 'points' => 2, 'name' => 'John Ab') ); echo Json::encode($source);
Outputs: