<?php
 
global $afw_path; // ASCOOS FRAMEWORK PATH
 
 
require_once $afw_path."/extras/encoders/json.php";
 
 
use ASCOOS\FRAMEWORK\Extras\Encoders\Json\TJsonHandler;
 
 
$json = new TJsonHandler();
 
$data = ["name" => "AlexSoft Software", "age" => 30];
 
$encoded = $json->encode($data);
 
$decoded = $json->decode($encoded);
 
 
echo "Encoded: $encoded\n"; // ?????????: {"name":"AlexSoft Software","age":30}
 
var_dump($decoded); // ?????????: array(2) { ["name"]=> string(7) "AlexSoft Software" ["age"]=> int(30) }
 
?>
 
 |