<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: JSONP: JSON With Padding</title>
	<atom:link href="http://ajaxian.com/archives/jsonp-json-with-padding/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/jsonp-json-with-padding</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: saeedneamati</title>
		<link>http://ajaxian.com/archives/jsonp-json-with-padding/comment-page-1#comment-285926</link>
		<dc:creator>saeedneamati</dc:creator>
		<pubDate>Mon, 26 Sep 2011 10:46:45 +0000</pubDate>
		<guid isPermaLink="false">http://test.ajaxian.com/archives/jsonp-json-with-padding#comment-285926</guid>
		<description>JSONP is an interesting concept, though I&#039;ve encountered it just now, in 2011. 

However, I still can&#039;t think of a real-world example of it. Should we use it for example for authentication purposes where the authentication URL sends back a JSON object of the logged-in user as JSONP? Can you add some real-world examples AJAXIAN?

Thanks.</description>
		<content:encoded><![CDATA[<p>JSONP is an interesting concept, though I&#8217;ve encountered it just now, in 2011. </p>
<p>However, I still can&#8217;t think of a real-world example of it. Should we use it for example for authentication purposes where the authentication URL sends back a JSON object of the logged-in user as JSONP? Can you add some real-world examples AJAXIAN?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Johnson &#187; Blog Archive &#187; Cross Domain AJAX with XML</title>
		<link>http://ajaxian.com/archives/jsonp-json-with-padding/comment-page-1#comment-6410</link>
		<dc:creator>Dave Johnson &#187; Blog Archive &#187; Cross Domain AJAX with XML</dc:creator>
		<pubDate>Sun, 09 Apr 2006 19:27:29 +0000</pubDate>
		<guid isPermaLink="false">http://test.ajaxian.com/archives/jsonp-json-with-padding#comment-6410</guid>
		<description>[...] On a post I made a few days back I proposed a way to do cross domain AJaX using XML rather than the commonly used JSON. It is essentially an extension of the idea of JSONP (JSON with Padding). Since I generally find myself working with XML more often than JSON I decided to create the equivalent for XML based applications. I have not extensively tested it but did try it on IE6 and FF1.5 on Win2K server. [...]</description>
		<content:encoded><![CDATA[<p>[...] On a post I made a few days back I proposed a way to do cross domain AJaX using XML rather than the commonly used JSON. It is essentially an extension of the idea of JSONP (JSON with Padding). Since I generally find myself working with XML more often than JSON I decided to create the equivalent for XML based applications. I have not extensively tested it but did try it on IE6 and FF1.5 on Win2K server. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajaxian &#187; Audible Ajax Episode 11: State of Ajax in Belgium</title>
		<link>http://ajaxian.com/archives/jsonp-json-with-padding/comment-page-1#comment-2558</link>
		<dc:creator>Ajaxian &#187; Audible Ajax Episode 11: State of Ajax in Belgium</dc:creator>
		<pubDate>Wed, 18 Jan 2006 21:04:54 +0000</pubDate>
		<guid isPermaLink="false">http://test.ajaxian.com/archives/jsonp-json-with-padding#comment-2558</guid>
		<description>[...] JSONP: JSON With Padding [...]</description>
		<content:encoded><![CDATA[<p>[...] JSONP: JSON With Padding [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Ippolito</title>
		<link>http://ajaxian.com/archives/jsonp-json-with-padding/comment-page-1#comment-1910</link>
		<dc:creator>Bob Ippolito</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://test.ajaxian.com/archives/jsonp-json-with-padding#comment-1910</guid>
		<description>Why NOT only prepend?  There&#039;s no reason to append.  The more detail there is to the spec, the more likely somebody is going to implement it incorrectly on one side or the other.  This is the simplest thing that could possibly work (for all use cases).

KISS.</description>
		<content:encoded><![CDATA[<p>Why NOT only prepend?  There&#8217;s no reason to append.  The more detail there is to the spec, the more likely somebody is going to implement it incorrectly on one side or the other.  This is the simplest thing that could possibly work (for all use cases).</p>
<p>KISS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Mahemoff</title>
		<link>http://ajaxian.com/archives/jsonp-json-with-padding/comment-page-1#comment-1911</link>
		<dc:creator>Michael Mahemoff</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://test.ajaxian.com/archives/jsonp-json-with-padding#comment-1911</guid>
		<description>Bob, agree that appending adds no new functionality, and in a protocol of this nature, that&#039;s a pretty good argument to KISS and stick with only prepending.

The main argument for append is that I think we&#039;ll see different idioms evolve in the whole area of remote scripting and JSON; adding a tiny bit more functionality in append just seems like it might encourage more creative uses to evolve.

I&#039;m reluctant to mention specific examples, because my main point is that best practices will only come from real use. But one example would be appending a property value (ie. json + &quot;.height&quot;) or an array index (json + &quot;[5]&quot;).</description>
		<content:encoded><![CDATA[<p>Bob, agree that appending adds no new functionality, and in a protocol of this nature, that&#8217;s a pretty good argument to KISS and stick with only prepending.</p>
<p>The main argument for append is that I think we&#8217;ll see different idioms evolve in the whole area of remote scripting and JSON; adding a tiny bit more functionality in append just seems like it might encourage more creative uses to evolve.</p>
<p>I&#8217;m reluctant to mention specific examples, because my main point is that best practices will only come from real use. But one example would be appending a property value (ie. json + &#8220;.height&#8221;) or an array index (json + &#8220;[5]&#8220;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michal Migurski</title>
		<link>http://ajaxian.com/archives/jsonp-json-with-padding/comment-page-1#comment-1912</link>
		<dc:creator>Michal Migurski</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://test.ajaxian.com/archives/jsonp-json-with-padding#comment-1912</guid>
		<description>From that article:

&quot;Your page is still toast if the remote host decides to inject malicious code instead of JSON data. However, if implemented, it&#039;d save a lot of developers some time and allow for generic abstractions, tutorials, and documentation to be built.&quot;

I&#039;ll take extra time over toasted pages any day of the week.

This idea was floated in the JSON-PHP group a few months back, and I felt pretty strongly that it was a bad one. Two reasons: 1) JSON isn&#039;t just for javascript, so adding syntax that only makes sense in javascript narrows its utility. Even the parentheses break Doug&#039;s simple spec. 2) Executing arbitrary responses from the server seems like a recipe for disaster. From this point of view, I&#039;m not altogether satisfied with the simple &quot;eval()&quot; method for handling JSON responses.

There&#039;s a lot of room for abuse in networked applications, and the excitement about API&#039;s, XHR and JSON could lead to a serious Outlook-style problem for javascript apps in the near future.</description>
		<content:encoded><![CDATA[<p>From that article:</p>
<p>&#8220;Your page is still toast if the remote host decides to inject malicious code instead of JSON data. However, if implemented, it&#8217;d save a lot of developers some time and allow for generic abstractions, tutorials, and documentation to be built.&#8221;</p>
<p>I&#8217;ll take extra time over toasted pages any day of the week.</p>
<p>This idea was floated in the JSON-PHP group a few months back, and I felt pretty strongly that it was a bad one. Two reasons: 1) JSON isn&#8217;t just for javascript, so adding syntax that only makes sense in javascript narrows its utility. Even the parentheses break Doug&#8217;s simple spec. 2) Executing arbitrary responses from the server seems like a recipe for disaster. From this point of view, I&#8217;m not altogether satisfied with the simple &#8220;eval()&#8221; method for handling JSON responses.</p>
<p>There&#8217;s a lot of room for abuse in networked applications, and the excitement about API&#8217;s, XHR and JSON could lead to a serious Outlook-style problem for javascript apps in the near future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Carrington</title>
		<link>http://ajaxian.com/archives/jsonp-json-with-padding/comment-page-1#comment-1913</link>
		<dc:creator>David Carrington</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://test.ajaxian.com/archives/jsonp-json-with-padding#comment-1913</guid>
		<description>I see no reason to do any work on the server for this (even just prepending a small string). It can be handled on the client entirely - in which case it is simply defining a callback function, which most AJAX code already does.</description>
		<content:encoded><![CDATA[<p>I see no reason to do any work on the server for this (even just prepending a small string). It can be handled on the client entirely &#8211; in which case it is simply defining a callback function, which most AJAX code already does.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Ippolito</title>
		<link>http://ajaxian.com/archives/jsonp-json-with-padding/comment-page-1#comment-1914</link>
		<dc:creator>Bob Ippolito</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://test.ajaxian.com/archives/jsonp-json-with-padding#comment-1914</guid>
		<description>Michael,

that&#039;s just silly.

Michal,

No.  JSONP is an optional extension, if you don&#039;t specify the jsonp query argument, then you get a normal JSON document.  No compatibility is lost, specs aren&#039;t broken.

eval() is perfectly safe for normal XMLHttpRequest.  After all, it&#039;s the same host you downloaded the JavaScript code from!  If you can taint the JSON response, you surely could&#039;ve tainted the code making it.  The remote host case is another story, but *you don&#039;t have a choice*.

JavaScript simply can&#039;t efficiently receive data from remote servers, except when loading  tags, which means full execute permission.

David,

If you don&#039;t see a reason to do any work on the server, then RTFM.  You&#039;re wrong.  It&#039;s not possible to do this client-side in the context of browser JavaScript.

</description>
		<content:encoded><![CDATA[<p>Michael,</p>
<p>that&#8217;s just silly.</p>
<p>Michal,</p>
<p>No.  JSONP is an optional extension, if you don&#8217;t specify the jsonp query argument, then you get a normal JSON document.  No compatibility is lost, specs aren&#8217;t broken.</p>
<p>eval() is perfectly safe for normal XMLHttpRequest.  After all, it&#8217;s the same host you downloaded the JavaScript code from!  If you can taint the JSON response, you surely could&#8217;ve tainted the code making it.  The remote host case is another story, but *you don&#8217;t have a choice*.</p>
<p>JavaScript simply can&#8217;t efficiently receive data from remote servers, except when loading  tags, which means full execute permission.</p>
<p>David,</p>
<p>If you don&#8217;t see a reason to do any work on the server, then RTFM.  You&#8217;re wrong.  It&#8217;s not possible to do this client-side in the context of browser JavaScript.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

