views:

1657

answers:

9

Related question: Explanation and usage of JSONP.

I know what JSON is but what is JSON-P?

How do you pronounce JSON-P?

+1  A: 

json with padding

redsquare
+6  A: 

JSONP or "JSON with padding"

It helps grabbing JSON from external domains. It’s all about a cleaner way to get data objects (and other things) from the external domain. Its a workaround for cross domain JavaScript issues. Also supported by jQuery.

Technical details

Arpit Tambi
A: 

http://en.wikipedia.org/wiki/JSON#JSONP

SO is not a replacement of Google you know?

Alex
Actually, this type of question is perfectly fine to ask here.
Jonathan Sampson
http://blog.stackoverflow.com/2009/06/podcast-58/
balpha
Nope, SO is the replacement of the result on google
Carl Bergquist
@Alex: actually it kind of is. joel's stated goal is that even the most basic question should be here, and if someone googles that question they should get SO as the top hit
Kip
@Alex, see Joel's question about LOGO as a perfect example
Nathan Koop
@Kip doesn't mean we should appease Joel's SEO desires by posting silly things.
Wahnfrieden
+3  A: 

What is JSONP?

Sinan Ünür
"GIYF" responses are discouraged. SO is his friend, which is why he asked it here.
Jonathan Sampson
@Jonathan Sampson My answer provided a link to specific blog post explaining in the simplest of terms what JSONP is. I think I understand SO and I am not sure its purpose is to repeat answers that are easily found on a search engine but specific, thorny programming questions which are very hard to locate using general purpose search engines. Here is what Jeff said: *It is by programmers, for programmers, with the ultimate intent of collectively increasing the sum total of good programming knowledge in the world.* http://www.codinghorror.com/blog/archives/001101.html
Sinan Ünür
+3  A: 

JSON-P = JSON with Padding

http://ajaxian.com/archives/jsonp-json-with-padding

http://en.wikipedia.org/wiki/JSON#JSONP

From Wikipedia:

"JSONP or "JSON with padding" is a JSON extension wherein a prefix is specified as an input argument of the call itself. This padding prefix is typically the name of a callback function, but may also be a variable assignment, an if statement, or any other Javascript statement prefix. The original proposition appears to have been made in the MacPython blog in 2005 [16] and is now used by many Web 2.0 applications such as Dojo Toolkit Applications, Google Toolkit Applications[17] and Web Services. Further extensions of this protocol have been proposed by considering additional input arguments as, for example, is the case of JSONPP[18] supported by S3DB web services. Because JSONP makes use of script tags, calls are essentially open to the world. For that reason, JSONP may be inappropriate to carry sensitive data.[19] Including script tags from remote sites allows the remote sites to inject any content into a website. If the remote sites have vulnerabilities that allow JavaScript injection, the original site can also be affected."

Doomspork
I'm not entirely sure I know what your problem is...
Doomspork
well repeating answers, see up
redsquare
Calm down kids or you are going to the naughty corner! Anyone would think SO charges you for storing the bits!
Aiden Bell
+17  A: 

How do I pronounce it? Jayson Pee.

Jesper
I'm immature enough to up-vote this - teehee, you said "Pee" :)
Jonathan Sampson
Smirks ... Sounds like some horrible name ... "Hi there, I am Jayson Pee"
Aiden Bell
"J-Sahn" pronunciation is fairly common too
Kip
Jay-san
Wahnfrieden
A: 

Actually, while the other answers are good, JSON-P does not necessitate the use of JSON. You can use whatever data format you like, as long as it follows the same idea as JSON-P. It refers more to the process of supplying a callback to the server, which will be used in the JavaScript code which is returned in the response.

Wahnfrieden
+1  A: 

See Douglas Crockford’s The JSON Saga where he mentions another pronunciation for JSON at about 7:45.

Gumbo