Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
OK, the first thing you need to know about JSONP is it has a dumb and non-obvious name: “JSON with Padding.” If we had to name it, we’d call it something like “JSON with a Callback” or “get me some JSON and execute it when you get it back” or, well, really just about anything other than JSON with Padding.
But, all the padding amounts to is wrapping a function around the JSON before it comes back in the request. Here’s how that works:
Web services let you specify a callback function.
In general, web services allow you to specify what you want the function to be named. Although we didn’t tell you, Mighty Gumball is already supporting a way to do this. Here’s how it works: when you specify your URL, add a parameter on the end, like this: