- var_dump: documentation ( source)
- json_decode: documentation ( source)
<?php
$json = <<<'JSON'
{
"query": [
"and for tomorrow"
],
"contexts": "[{'name':'weather', 'lifespan' : 4}]",
"location": {
"latitude": 37.459157,
"longitude": -122.17926
},
"timezone": "America/New_York",
"lang": "en",
"sessionId": "1234567890"
}
JSON;
$data = json_decode($json, true);
var_dump($data);