Please explain JSONP

Posted by Cheeso on Stack Overflow See other posts from Stack Overflow or by Cheeso
Published on 2010-01-14T20:53:48Z Indexed on 2010/05/22 7:30 UTC
Read the original article Hit count: 205

Filed under:
|
|

I don't understand jsonp.

I understand JSON. I don't understand JSONP. Wikipedia is the top search result for JSONP. It says JSONP or "JSON with padding" is a JSON extension wherein a prefix is specified as an input argument of the call itself.

Huh? What call? That doesn't make any sense to me. JSON is a data format. There's no call.

The 2nd search result is from some guy named Remy, who writes JSONP is script tag injection, passing the response from the server in to a user specified function.

I can sort of understand that, but it's still not making any sense.


What is JSONP, why was it created (what problem does it solve), and why would I use it?


Addendum: I've updated Wikipedia with a clearer and more thorough description of JSONP, based on jvenema's answer. Thanks, all.

© Stack Overflow or respective owner

Related posts about JSON

Related posts about jsonp