Skip to main content
Edit title to match question asked in body
Link
mikemaccana
  • 126.1k
  • 113
  • 441
  • 544

What is JSONP all about, and why was it created?

Post Reopened by Salman Arshad javascript
terminology tag
Link
hippietrail
  • 17.3k
  • 21
  • 113
  • 181
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

I understand JSON, but not JSONP. Wikipedia's document on JSON is (was) the top search result for JSONP. It says this:

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 RemyRemy, who writes this about JSONP:

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.


So what is JSONP? Why was it created (what problem does it solve)? And why would I use it?


Addendum: I've just created a new page for JSONP on Wikipedia; it now has a clear and thorough description of JSONP, based on jvenemajvenema's answer.

I understand JSON, but not JSONP. Wikipedia's document on JSON is (was) the top search result for JSONP. It says this:

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 this about JSONP:

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.


So what is JSONP? Why was it created (what problem does it solve)? And why would I use it?


Addendum: I've just created a new page for JSONP on Wikipedia; it now has a clear and thorough description of JSONP, based on jvenema's answer.

I understand JSON, but not JSONP. Wikipedia's document on JSON is (was) the top search result for JSONP. It says this:

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 this about JSONP:

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.


So what is JSONP? Why was it created (what problem does it solve)? And why would I use it?


Addendum: I've just created a new page for JSONP on Wikipedia; it now has a clear and thorough description of JSONP, based on jvenema's answer.

Post Closed as "Duplicate" by Quentin json
Question Protected by Samuel Liew
Improved formatting
Source Link
Sebastian Zartner
  • 20.4k
  • 10
  • 104
  • 143
Loading
deleted 33 characters in body; edited title
Source Link
Peter O.
  • 33.1k
  • 14
  • 86
  • 97
Loading
added 106 characters in body; edited tags
Source Link
Cheeso
  • 193.3k
  • 106
  • 486
  • 734
Loading
added 51 characters in body; edited tags
Source Link
nickf
  • 547.8k
  • 199
  • 660
  • 727
Loading
ytpos
Source Link
Cheeso
  • 193.3k
  • 106
  • 486
  • 734
Loading
addendum
Source Link
Cheeso
  • 193.3k
  • 106
  • 486
  • 734
Loading
added 29 characters in body
Source Link
Cheeso
  • 193.3k
  • 106
  • 486
  • 734
Loading
Source Link
Cheeso
  • 193.3k
  • 106
  • 486
  • 734
Loading