0

So I can't seem to find an straight answer to my problem.

What I want to do is load a JSON file that's located on a specified URL. It's a large complicated JSON file. Basically, I've been trying to use AJAX to 'get' the file all night long. I've used the $.getJSON Jquery shortcut too, without any luck. I believe the server isn't allowing for AJAX requests, but if I enter in the URL I can access the file without a problem.

My question is, is there any way I can get the file so I could use it in order to create this little mock up site that I need to create?

Is this possible?

I've tried looking for a way to just rip the text off of the URL and then just turning that into a JSON file so I could parse it, but I haven't found any relevant information on this tactic.

If you have any ideas, please let me know, thank you! :D

Ryan K
  • 3,985
  • 4
  • 39
  • 42
  • 1
    If the server doesn't allow CORS or JSONP, you can't get it from the clientside, you would have to use serverside code to get the file, and then write clientside code that executes the serverside script with ajax etc. – adeneo Apr 11 '15 at 12:22
  • Use curl http://stackoverflow.com/questions/9784567/net-equivalent-of-curl-to-upload-a-file-to-rest-api – Waleed Kasem Apr 11 '15 at 12:53
  • What language are you using on your server? See http://ajaxpatterns.org/archive/Cross-Domain_Proxy.php – Ruan Mendes Apr 11 '15 at 13:22
  • It's not my server. All I have access to is the server side JSON. It's part of a Job application, so all I have to go on is the JSON code they gave me. I may just end up saving the JSON code and using it like that. –  Apr 11 '15 at 23:36

0 Answers0