Gjson is a PHP library to work under the Google Json Style Guide standard.
Via Composer
$ composer require normeno/gjson
$format = new Format();
echo $format->removeEmpty(['foo' => 'bar', 'null' => null, 'empty' => '', 'zero' => 0]);
$format = new Format();
echo $format->setRfc3339('1989-10-05');
$format = new Format();
echo $format->convertSnakeToCamel([
'laTaM_cOuNtRy' => 'Chile',
'latam_REGION' => 'Metropolitana',
'LATAM_city' => 'Santiago'
]);
$format = new Format();
echo $format->setIso6709(['+40.6894', '-074.0447']);
$response = new Response();
echo $this->response->error(404, 'File Not Found');
$response = new Response();
$data = [
'items' => [
'company' => 'Google',
'website' => 'https://www.google.com/'
]
];
echo $this->response->success($data);
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.