mirror of
https://github.com/EFTEC/Services_JSON.git
synced 2026-08-20 07:12:49 +00:00
15 lines
412 B
PHP
15 lines
412 B
PHP
<?php /** @noinspection ForgottenDebugOutputInspection */
|
|
|
|
use eftec\ServicesJson\Services_JSON;
|
|
include '../vendor/autoload.php';
|
|
|
|
$json='{"hello":{"a":2,"b":3},"world":[1,2,3,"aaa"]}';
|
|
echo "Decode as stdclass:<br>";
|
|
echo "<pre>";
|
|
var_dump(Services_JSON::decode($json));
|
|
echo "</pre>";
|
|
echo "Decode as array:<br>";
|
|
echo "<pre>";
|
|
var_dump(Services_JSON::decode($json, Services_JSON::GET_ARRAY));
|
|
echo "</pre>";
|