Outputing and parsing JSON from package to single page
Permalink
Here's the JSON:http://mcormc.co/api?action=feeds...
Here's the code behind that single page:
The JSON that outputs there is good: I can parse the same data from a_static_file.json to a single page installed through a custom concrete5 package. I can't figure out why I can't parse the data directly. I suspect that the problem could draw from the content-type. Any suggestion here would be appreciated.
In a a custom package's controller or single_page folder in concrete5, how can I correctly set the content-type of a single page to JSON?
Here's the code behind that single page:
The JSON that outputs there is good: I can parse the same data from a_static_file.json to a single page installed through a custom concrete5 package. I can't figure out why I can't parse the data directly. I suspect that the problem could draw from the content-type. Any suggestion here would be appreciated.
In a a custom package's controller or single_page folder in concrete5, how can I correctly set the content-type of a single page to JSON?