1. Go to this page and download the library: Download yadakhov/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/ */
// There are 2 ways to instantiation a new Json object
// 1.
$json1 = new Json('{"status":"success"}');
// 2
$json2 = new Json(['status' => 'success']);
$json->get('dot.notation') - get a field
$json->set('dot.notation', $value) - set a field
$json->toString() - return the Json object as a string
$json->toStringDot() - return the dot notation of the structure.
$json->toStringPretty() - json pretty print
$json->toArray() - return the array representation.
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.