PHP code example of robertsaupe / php-json

1. Go to this page and download the library: Download robertsaupe/php-json 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/ */

    

robertsaupe / php-json example snippets


use robertsaupe\Json\Json;

$json = new Json();
print_r($json->decodeFile('path_to_file.json'));

use robertsaupe\Json\Jsonc;

$jsonc = new Jsonc();
print_r($jsonc->decodeFile('path_to_file.jsonc'));