[{
"ID": 1,
"datum": "2016-02-04 14:20:59",
"nummer": "+467123123951",
"text": "Svar..."
}, {
"ID": 2,
"datum": "2016-02-05 10:11:36",
"nummer": "+467123123951",
"text": "BLOOG STOPP"
}]
This is the respose I get but I have problems converting it to array with decode-function in php. Is this json-string malformed?
How can I generate a php table or print it nicely.
would appreciate any help, thanks.
Edit: My php version is 5.6 The JSON-string seems to be valid according to JSONLint. I get the JSON from my service provider ($url) with the following php-code:
$in=file_get_contents($url."/in/?key=xxxxxxxxx");
$json = json_decode($in);
echo json_encode($json, JSON_PRETTY_PRINT);
and the response header:
Connection: close, Content-Encoding: gzip, Content-Length: 212, Content-Type: text/html, Date: Sat, 06 Feb 2016 07:25:07 GMT, Server: nginx, Vary: Accept-Encoding,User-Agent
Does this (Content-Encoding: gzip) mean that the response is compressed?