I am trying to parse json using json_decode in php.
It is failing for a url, Can any one tell me why its failing and is there ant alternative to json_decode in php ?
Here is my code
$url='https://espn.go.com/travel/sports/calendar/getList.json?&xhr=1&date=20121027&type=list&query=null&myTeams=';
$html = file_get_html($url);
$json=json_decode($html,true);
//json is null here
file_get_htmlis PHP Simple HTML DOM ParserNot default PHP functionIt should bePlease also Note that the returned JSON has an error of Malformed UTF-8 characters, possibly incorrectly encoded
To Fix THis
Output
See Live Demo