mirror of
https://github.com/EFTEC/Services_JSON.git
synced 2026-08-22 02:52:00 +00:00
2.0
This commit is contained in:
@@ -2,14 +2,13 @@
|
||||
|
||||
use eftec\ServicesJson\Services_JSON;
|
||||
include '../vendor/autoload.php';
|
||||
$s=new Services_JSON();
|
||||
|
||||
$json='{"hello":{"a":2,"b":3},"world":[1,2,3,"aaa"]}';
|
||||
echo "Decode as stdclass:<br>";
|
||||
echo "<pre>";
|
||||
var_dump($s->decode($json));
|
||||
var_dump(Services_JSON::decode($json));
|
||||
echo "</pre>";
|
||||
echo "Decode as array:<br>";
|
||||
echo "<pre>";
|
||||
var_dump($s->decode($json,true));
|
||||
var_dump(Services_JSON::decode($json, Services_JSON::SERVICES_JSON_AS_ARRAY));
|
||||
echo "</pre>";
|
||||
|
||||
Reference in New Issue
Block a user