Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving a JSON file from a URL

Status
Not open for further replies.

HHaack

Programmer
Sep 27, 2011
2
US
I'm working on a project and attempting to read data in from a url. I've been told I have to use JavaScript, and I have to read this in as a json file, which is supported by the site. All of the code I've been attempting to use simply has not worked, and I'm a bit stumped at this point. For example, the first url I'm pulling from is:
Any hints or tips on what may work would be greatly appreciated!
 
Haha, I can't believe I actually did that. The url I've been using actually has been altered to use json, but it was easier to go to the website and copy that then find my code and find the url in the code, and the default on the website shows xml. But yes, I am using a url that actually says json, I'm just trying to find the syntax that'll pull that into my project and let me play with it, preferably keeping it as a json object, since its properties are surprisingly handy for what I'm trying to do.
 
Hi

You mean, your question was about processing, not obtaining the JSON data ?

I found no API documentation on that site, but would be useful to know if they support JSONP. ( Actually the same JSON, but returned as parameter to a call for your callback function. )

The next question would be, how you intend to get the data. Me test with [tt]XMLHttpRequest[/tt] failed, due to the Same Origin Policy.


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top