PHP code example of divinity76 / json_decode_superset

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

    

divinity76 / json_decode_superset example snippets



declare(strict_types=1);
ecode_superset\json_decode_superset;
$json_superset = '{test: "valid javascript object, but invalid json"}';
$php_array = json_decode_superset($json_superset, true, 512, JSON_THROW_ON_ERROR);
var_dump($php_array); // array(1) { ["test"]=> string(37) "valid javascript object, but invalid json" }