<?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: JSON data island</title>
	<atom:link href="http://www.phpied.com/json-data-island/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpied.com/json-data-island/</link>
	<description>Stoyan&#039;s blog about &#60;a href=&#34;/category/xhtml&#34; class=&#34;tag-minor&#34;&#62;(x)html(5)&#60;/a&#62;, &#60;a href=&#34;/category/ajax&#34; class=&#34;tag-major&#34;&#62;ajax&#60;/a&#62;, &#60;a href=&#34;/category/bookmarklets&#34; class=&#34;tag-major&#34;&#62;bookmarklets&#60;/a&#62;, &#60;a href=&#34;/category/browsers&#34; class=&#34;tag-minor&#34;&#62;browsers&#60;/a&#62;, &#60;a href=&#34;/category/css&#34; class=&#34;tag-normal&#34;&#62;css&#60;/a&#62;, &#60;a href=&#34;/category/firebug&#34; class=&#34;tag-minor&#34;&#62;firebug&#60;/a&#62;, &#60;a href=&#34;/category/javascript&#34; class=&#34;tag-numero-uno&#34;&#62;javascript&#60;/a&#62;, &#60;a href=&#34;/category/json&#34; class=&#34;tag-normal&#34;&#62;json&#60;/a&#62;, &#60;a href=&#34;/category/mdb2&#34; class=&#34;tag-minor&#34;&#62;mdb2&#60;/a&#62;, &#60;a href=&#34;/category/mysql&#34; class=&#34;tag-normal&#34;&#62;mysql&#60;/a&#62;, &#60;a href=&#34;/category/pear&#34; class=&#34;tag-numero-uno&#34;&#62;pear&#60;/a&#62;, &#60;a href=&#34;/category/performance&#34; class=&#34;tag-major&#34;&#62;performance&#60;/a&#62;, &#60;a href=&#34;/category/php&#34; class=&#34;tag-numero-uno&#34;&#62;php&#60;/a&#62;, &#60;a href=&#34;/category/phpbb&#34; class=&#34;tag-major&#34;&#62;phpbb&#60;/a&#62;, &#60;a href=&#34;/category/tools&#34; class=&#34;tag-normal&#34;&#62;tools&#60;/a&#62;, &#60;a href=&#34;/category/yslow&#34; class=&#34;tag-minor&#34;&#62;yslow&#60;/a&#62;, &#60;a href=&#34;/category/yui&#34; class=&#34;tag-normal&#34;&#62;yui&#60;/a&#62;, &#60;a href=&#34;/category/writing&#34; class=&#34;tag-minor&#34;&#62;writing&#60;/a&#62;, &#60;a href=&#34;/category/music&#34; class=&#34;tag-major&#34;&#62;music&#60;/a&#62;,... &#60;a href=&#34;/category/life-and-everything&#34; class=&#34;tag-normal&#34;&#62;life and everything&#60;/a&#62;.</description>
	<lastBuildDate>Fri, 10 Feb 2012 22:15:15 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: she went back to her ex</title>
		<link>http://www.phpied.com/json-data-island/#comment-78504</link>
		<dc:creator>she went back to her ex</dc:creator>
		<pubDate>Tue, 23 Aug 2011 07:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/json-data-island/#comment-78504</guid>
		<description>Hello there, I found your web site via Google even as looking for a comparable matter, your site got here up, it appears to be like good. I&#039;ve bookmarked it in my google bookmarks.</description>
		<content:encoded><![CDATA[<p>Hello there, I found your web site via Google even as looking for a comparable matter, your site got here up, it appears to be like good. I&#8217;ve bookmarked it in my google bookmarks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark S</title>
		<link>http://www.phpied.com/json-data-island/#comment-78482</link>
		<dc:creator>Mark S</dc:creator>
		<pubDate>Wed, 17 Aug 2011 20:04:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/json-data-island/#comment-78482</guid>
		<description>GREAT article.  In the land of MVC, REST and AJAX, this is a great solution to handling data that needs to be late-loaded - especially when jQuery is involved.  Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>GREAT article.  In the land of MVC, REST and AJAX, this is a great solution to handling data that needs to be late-loaded &#8211; especially when jQuery is involved.  Thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hamster Cages</title>
		<link>http://www.phpied.com/json-data-island/#comment-75382</link>
		<dc:creator>Hamster Cages</dc:creator>
		<pubDate>Wed, 22 Dec 2010 20:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/json-data-island/#comment-75382</guid>
		<description>before you buy some very expensive SEO Tools, always look for a review first before you invest on them ~~~</description>
		<content:encoded><![CDATA[<p>before you buy some very expensive SEO Tools, always look for a review first before you invest on them ~~~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anasanjara</title>
		<link>http://www.phpied.com/json-data-island/#comment-73909</link>
		<dc:creator>anasanjara</dc:creator>
		<pubDate>Tue, 17 Aug 2010 01:10:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/json-data-island/#comment-73909</guid>
		<description>I am a bit confused about json. why to use it?  I google it and found that it make easy to interchange information and can be used over xml ... well structured , but if I dont use it then wht happened ? what is it purpose ?

I have used this function for username availability check :

function ShowAvailability() {
$.ajax({
type: &quot;POST&quot;,
url: &quot;CS.aspx/CheckUserName&quot;,
data: &#039;{userName: &quot;&#039; + $(&quot;#&quot;)[0].value + &#039;&quot; }&#039;,
contentType: &quot;application/json; charset=utf-8&quot;,
dataType: &quot;json&quot;,
success: OnSuccess,
failure: function(response) {
alert(response);
}
});
}

what if I removed &lt;strong&gt;dataType: &quot;json&quot;&lt;/strong&gt; from this $.ajax method . then what happened?

 I have read article in which its written that : 

You see, in an Ajax environment where we make calls to web services we expect to get some data back in some form. Well, if we receive XML back as a direct result of an Ajax call, we have to send that data through an XML parser before we can even begin to manipulate the data to be useful to JavaScript. If we receive the data in JSON...we don&#039;t have to do anything but assign the results to a variable because JSON is already JavaScript. From there, we can manipulate the data as normal. 

can u provide me example by providing simple code which will illustrate above statement ?</description>
		<content:encoded><![CDATA[<p>I am a bit confused about json. why to use it?  I google it and found that it make easy to interchange information and can be used over xml &#8230; well structured , but if I dont use it then wht happened ? what is it purpose ?</p>
<p>I have used this function for username availability check :</p>
<p>function ShowAvailability() {<br />
$.ajax({<br />
type: &#8220;POST&#8221;,<br />
url: &#8220;CS.aspx/CheckUserName&#8221;,<br />
data: &#8216;{userName: &#8220;&#8216; + $(&#8220;#&#8221;)[0].value + &#8216;&#8221; }&#8217;,<br />
contentType: &#8220;application/json; charset=utf-8&#8243;,<br />
dataType: &#8220;json&#8221;,<br />
success: OnSuccess,<br />
failure: function(response) {<br />
alert(response);<br />
}<br />
});<br />
}</p>
<p>what if I removed <strong>dataType: &#8220;json&#8221;</strong> from this $.ajax method . then what happened?</p>
<p> I have read article in which its written that : </p>
<p>You see, in an Ajax environment where we make calls to web services we expect to get some data back in some form. Well, if we receive XML back as a direct result of an Ajax call, we have to send that data through an XML parser before we can even begin to manipulate the data to be useful to JavaScript. If we receive the data in JSON&#8230;we don&#8217;t have to do anything but assign the results to a variable because JSON is already JavaScript. From there, we can manipulate the data as normal. </p>
<p>can u provide me example by providing simple code which will illustrate above statement ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emil</title>
		<link>http://www.phpied.com/json-data-island/#comment-50044</link>
		<dc:creator>Emil</dc:creator>
		<pubDate>Thu, 08 Mar 2007 15:05:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/json-data-island/#comment-50044</guid>
		<description>blog software had a bug, what i mean was:

input type=&quot;hidden&quot; id=&quot;json_data_island&quot; value=&quot;{prop:&#039;value&#039;, prop2:[&#039;value1&#039;,&#039;value2&#039;,&#039;value3&#039;]}&quot;</description>
		<content:encoded><![CDATA[<p>blog software had a bug, what i mean was:</p>
<p>input type=&#8221;hidden&#8221; id=&#8221;json_data_island&#8221; value=&#8221;{prop:&#8217;value&#8217;, prop2:['value1','value2','value3']}&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emil</title>
		<link>http://www.phpied.com/json-data-island/#comment-50043</link>
		<dc:creator>Emil</dc:creator>
		<pubDate>Thu, 08 Mar 2007 15:03:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/json-data-island/#comment-50043</guid>
		<description>Why not 


And then 

var the_data = eval(&#039;(&#039; + document.getElementById(&#039;json_data_island&#039;).value + &#039;)&#039;);
alert(the_data.prop2);

No problems with ie5/5.5, gecko white spaces etc.</description>
		<content:encoded><![CDATA[<p>Why not </p>
<p>And then </p>
<p>var the_data = eval(&#8216;(&#8216; + document.getElementById(&#8216;json_data_island&#8217;).value + &#8216;)&#8217;);<br />
alert(the_data.prop2);</p>
<p>No problems with ie5/5.5, gecko white spaces etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: All in a days work&#8230;</title>
		<link>http://www.phpied.com/json-data-island/#comment-49285</link>
		<dc:creator>All in a days work&#8230;</dc:creator>
		<pubDate>Wed, 14 Feb 2007 01:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/json-data-island/#comment-49285</guid>
		<description>[...] JSON data island The idea is to use a comment in your HTML that holds some data in JSON format. Then using DOM, you access the comment, eval()-uate it and there you go - you have the data as a Javascript object. (tags: JSON) [...]</description>
		<content:encoded><![CDATA[<p>[...] JSON data island The idea is to use a comment in your HTML that holds some data in JSON format. Then using DOM, you access the comment, eval()-uate it and there you go &#8211; you have the data as a Javascript object. (tags: JSON) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DeadMoroz</title>
		<link>http://www.phpied.com/json-data-island/#comment-49269</link>
		<dc:creator>DeadMoroz</dc:creator>
		<pubDate>Tue, 13 Feb 2007 11:48:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/json-data-island/#comment-49269</guid>
		<description>&gt;&gt; &lt;i&gt;Inline scripts are bad, they mix behaviour (JS) with content (HTML).&lt;/i&gt;

Not exactly in this case. It would contain only content, as well as HTML.</description>
		<content:encoded><![CDATA[<p>&gt;&gt; <i>Inline scripts are bad, they mix behaviour (JS) with content (HTML).</i></p>
<p>Not exactly in this case. It would contain only content, as well as HTML.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian McAllister</title>
		<link>http://www.phpied.com/json-data-island/#comment-49268</link>
		<dc:creator>Brian McAllister</dc:creator>
		<pubDate>Tue, 13 Feb 2007 07:45:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpied.com/json-data-island/#comment-49268</guid>
		<description>I&#039;ve tried integrating something like this into a form validation script (all of the validation regular expressions were placed as comments beside the associated form control) but... and there&#039;s always a &quot;but&quot;; standards purists will point out that the spec states that &quot;Information that appears between comments has no special meaning&quot;. This means our crafty use of comments invalidates the page they are used within. OK, the page still passes the on-line validator but, in purist reality, it fails validation on this point.

Also, Internet Explorer 5 &amp; 5.5 don&#039;t add comment nodes to the DOM so the script will fail in those browser versions.

Personally, I like the idea but prefer to get my server-side code to add the appropriate javascript to the head of the document (when possible).</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried integrating something like this into a form validation script (all of the validation regular expressions were placed as comments beside the associated form control) but&#8230; and there&#8217;s always a &#8220;but&#8221;; standards purists will point out that the spec states that &#8220;Information that appears between comments has no special meaning&#8221;. This means our crafty use of comments invalidates the page they are used within. OK, the page still passes the on-line validator but, in purist reality, it fails validation on this point.</p>
<p>Also, Internet Explorer 5 &amp; 5.5 don&#8217;t add comment nodes to the DOM so the script will fail in those browser versions.</p>
<p>Personally, I like the idea but prefer to get my server-side code to add the appropriate javascript to the head of the document (when possible).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

