I guess there may be a hidden character inside.
JSON data:
The following response i am getting using this URL
{"request":{"command":"series","series_id":"ng.n3010us3.a"},"data":{"error":"No api_key. For key registration, documentation, and examples see http://www.eia.gov/developer/"}}
What I did:
Use file_get_contents fetch the data from the URL
use json_decode($rawjson,TRUE); to make it as an array. -> ERROR
the json_last_error_message shows 'Syntax Error'
I'm trying to find which character is causing the problem.