PHP code example of normeno / gjson

1. Go to this page and download the library: Download normeno/gjson library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

normeno / gjson example snippets

 php
$format = new Format();
echo $format->removeEmpty(['foo' => 'bar', 'null' => null, 'empty' => '', 'zero' => 0]);
 php
$format = new Format();
echo $format->setRfc3339('1989-10-05');
 php
$format = new Format();
echo $format->convertSnakeToCamel([
    'laTaM_cOuNtRy' => 'Chile',
    'latam_REGION'  => 'Metropolitana',
    'LATAM_city'    => 'Santiago'
]);
 php
$format = new Format();
echo $format->setIso6709(['+40.6894', '-074.0447']);
 php
$response = new Response();
echo $this->response->error(404, 'File Not Found');
 php
$response = new Response();
$data = [
    'items' => [
        'company'   => 'Google',
        'website'   => 'https://www.google.com/'
    ]
];

echo $this->response->success($data);