<?php
$string = '{"smartling":
{"en-us":
{"files": [{
"fileUri": "/dictionaries/sample_en.json",
"stringCount": 100,
"wordCount": 12540,
"approvedStringCount": 100,
"completedStringCount": 40,
"lastUploaded": "2014-06-12",
"fileType": "json"
}] },
"ja-jp": {
"files":[{
"fileUri": "/dictionaries/sample_en.json",
"stringCount": 100,
"wordCount": 12540,
"approvedStringCount": 100,
"completedStringCount": 40,
"lastUploaded": "2014-06-12",
"fileType": "json"
}]
}
}
}';
$result = json_decode($string);
// Result: object(stdClass)#1 (2) { ["foo"]=> string(3) "bar" ["cool"]=> string(4) "attr" }
var_dump($result);
preferences:
41.98 ms | 402 KiB | 5 Q