I cannot make json_decode() to work when the string value contains single quote (') as example below:
$result = "{\"message\":\"test \' \",\"report\":[{\"1\":[{\"port\":\"gsm-1.2\",\"phonenumber\":\"XXXXXXXXXXX\",\"time\":\"2016-08-31 00:22:57\",\"result\":\"success\"}]}]}";
$resp = json_decode($result, true);
echo $resp;