I am trying to connect to the RubyGems API, but when I try to get the JSON I get an stange error.
Uncaught SyntaxError: Unexpected token :
Given that you're passing in a data-handler function to getJSON(), are you sure you want the JSONP callback parameter? Try removing ?jsoncallback=? from the URL:
getJSON()
?jsoncallback=?
.getJSON("http://rubygems.org/api/v1/gems/rails.json", function(data) { ...function stuff.... });