Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8431741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:56:14+00:00 2026-06-10T05:56:14+00:00

I spent most of last night trying out the ‘getJSON’ method in JQuery against

  • 0

I spent most of last night trying out the ‘getJSON’ method in JQuery against the Flickr API. I managed to have a look at some examples from the JQuery docs and managed to make them work, however attempts at reading JSON from my custom API calls failed miserably.

Snippets:

This works:

  //JQuery Flickr example code - works!
  $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?&format=json",
  function(data) {
    $.each(data.items, function(i,item){
      alert(item.media.m);
      if ( i == 3 ) return false;
    });
  });

This fails!

  //Custom Flickr API Call - nothing?fail?
  $.getJSON("http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=c258d8ae4c29bb74da198c6ac3874671&text=Mclaren&per_page=3&format=json&callback=?&nojsoncallback=1",
  function(data) {

    alert(data);


  }).error(function(jqXHR, textStatus, errorThrown) { alert(textStatus + errorThrown); });

The second API call is a valid resource, it works in the browser/fiddler and I can see the JSON content, but in my JS code an error is raised

"parsererrorError: jQuery18007627279118169099_1345796861535 was not called".

At this point I’m stuck, ultimately my end goal is to process the returned JSON and itterate over each ‘photo’ object in the nested array so that I can easily access their sub properties during iteration like so:

[photo-instance].id

[photo-instance].owner

[photo-instance].secret
etc…

Any help would be greatly appreciated.

Ref: http://www.flickr.com/services/api/response.json.html

Note: All API keys are for test purposes and will be destroyed soon.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:56:15+00:00Added an answer on June 10, 2026 at 5:56 am

    From Jquery documentation :

    If the URL includes the string “callback=?” (or similar, as defined by
    the server-side API), the request is treated as JSONP instead. See the
    discussion of the jsonp data type in $.ajax() for more details.

    As your URL contains callback=?, the jQuery getJSON function is waiting for a (dynamically specified) callback call, JSONP style. But as you specified nojsoncallback in the URL, the server sends a standard JSON content as specified in the documentation you provide :

    If you just want the raw JSON, with no function wrapper, add the
    parameter nojsoncallback with a value of 1 to your request.

    Remove the callback=? from you URL and you should be fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I spend most of my time in C# and am trying to figure out
Spent a solid hour trying to sort out why on earth this (coffeescript) $.ajax
I've spent that last two hours starring at the most cookie cutter block of
I've spent the last two days trying to get some bloody data to export
I've spent the last couple of hours trying to find a solution to my
I spent the better part of last month beating my head against the wall
I've spent the last 2 hours trying to find a solution for this and
I have spent most of my web-development career in the Microsoft camp, but for
Spent many hours and still can't figure that out. sampleData.json file contains the following
I spent a lot of time figuring out the function in the code level

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.