I've been working on an tool that displays information from an API using PHP. Up until now I've been trying to echo individual fields of information one at a time in order to format them. Now I'm curious is it possible for me to somehow return just the whole unparsed JSON return, by this I mean just the raw JSON as it it. Can I somehow call that into a PHP page?
Here's an example of the JSON I'm referring to..
If you just want to output the
json from https://api.data.gov/sam/v4/registrations/... on your website, you can use:
header('Content-Type: application/json'); $url = "https:///someJsonUrl"; echo file_get_contents($url);