<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Webmaster-Source &#187; json</title>
	<atom:link href="https://www.webmaster-source.com/tag/json/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.webmaster-source.com</link>
	<description>Useful Resources For Webmasters</description>
	<lastBuildDate>Thu, 24 Aug 2017 02:01:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.42</generator>
	<item>
		<title>How IMDB&#8217;s Speedy Search Suggestions Work</title>
		<link>https://www.webmaster-source.com/2013/05/01/how-imdbs-speedy-search-suggestions-work/</link>
		<comments>https://www.webmaster-source.com/2013/05/01/how-imdbs-speedy-search-suggestions-work/#comments</comments>
		<pubDate>Wed, 01 May 2013 11:35:56 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[static]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=5049</guid>
		<description><![CDATA[If you type a few letters into the search field over at the Internet Movie Database, you might notice how fast it is. That&#8217;s because they&#8217;re not served dynamically from their primary servers. IMDB, instead, serves the JSON data for search suggestions from a CDN, resulting in a significant speed boost. They use pregenerated static [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><img style=' float: right; padding: 4px; margin: 0 0 2px 7px;'  class="alignright size-full wp-image-5050 imgborder" alt="IMDB Search JSON" src="//www.webmaster-source.com/wp-content/uploads/2013/03/imdbsuggestjson.png" width="300" height="207" />If you type a few letters into the search field over at the <a href="http://imdb.com/">Internet Movie Database</a>, you might notice how fast it is. That&#8217;s because they&#8217;re not served dynamically from their primary servers. IMDB, instead, serves the JSON data for search suggestions from a CDN, resulting in a significant speed boost. They use pregenerated static files to make this possible.</p>
<p>For example, if you visit this URL, you&#8217;ll get a JSON file of results for Harry Potter films:</p>
<pre class="brush: plain; title: ; notranslate">http://sg.media-imdb.com/suggests/h/harry.json</pre>
<p>The &#8220;h&#8221; directory means the query starts with an &#8220;h,&#8221; as they group their result sets alphabetically, and the &#8220;harry&#8221; part is what was typed into the search box. So if you wanted results that would match Doctor Who, you could use <a href="http://sg.media-imdb.com/suggests/d/doct.json"><code>/d/doct.json</code></a>. (Spaces are replaced with underscores.)</p>
<p>They only seem to have result sets for 4-5 character inputs, though. So you can query &#8220;ince&#8221; but not &#8220;inception.&#8221; The latter will result in an error. I guess most searches common enough to be matched in the suggestion box are covered within that limitation.</p>
<p>It&#8217;s a clever implementation, and it has to save a lot of computing power on a site that large, in addition to being fast.</p>
<p>(Note that this is not a public API, and IMDB/Amazon probably wouldn&#8217;t be happy about you scraping it or anything like that. But it&#8217;s a nice thing to learn from.)</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2013/05/01/how-imdbs-speedy-search-suggestions-work/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Get Twitter and Facebook Link Statistics with JSON and jQuery</title>
		<link>https://www.webmaster-source.com/2011/06/24/get-twitter-and-facebook-link-statistics-with-json-and-jquery/</link>
		<comments>https://www.webmaster-source.com/2011/06/24/get-twitter-and-facebook-link-statistics-with-json-and-jquery/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 12:33:47 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=4076</guid>
		<description><![CDATA[Both Twitter and Facebook have little JavaScript widgets that allow you to share a page using the respective service, displaying a running total of users who have done so. While that&#8217;s fine for most purposes, what if you just need the count, for some atypical application? It&#8217;s not well-documented, but the two social media sites [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Both Twitter and Facebook have little JavaScript widgets that allow you to share a page using the respective service, displaying a running total of users who have done so. While that&#8217;s fine for most purposes, what if you just need the count, for some atypical application?</p>
<p>It&#8217;s not well-documented, but the two social media sites have JSON APIs for that purpose.</p>
<ul>
<li><a href="http://urls.api.twitter.com/1/urls/count.json?url=http://xkcd.com/792/"><code>http://urls.api.twitter.com/1/urls/count.json?url=THE_URL</code></a></li>
<li><a href="https://graph.facebook.com/http://xkcd.com/792/"><code>https://graph.facebook.com/THE_URL</code></a></li>
</ul>
<p>With a little bit of jQuery magic, you can collect the values on page load and update the DOM with the number. Here&#8217;s something I threw together for a project I was working on:</p>
<pre class="brush: jscript; title: ; notranslate">
(function() {

var url = 'http://xkcd.com/792/';

jQuery.getJSON(&quot;http://urls.api.twitter.com/1/urls/count.json?url=&quot;+url+&quot;&amp;callback=?&quot;, function(data) {
jQuery('#socialstuff span.twcount').html(data.count);
});

jQuery.getJSON(&quot;https://graph.facebook.com/&quot;+url+&quot;&amp;callback=?&quot;, function(data) {
jQuery('#socialstuff span.fbcount').html(data.shares);
});

}());
</pre>
<p>As long as you remember to include jQuery, and have the right HTML elements for the JavaScript to populate, it&#8217;s pretty much plug-and-play.</p>
<p>You can <a href="http://www.webmaster-source.com/static/demos/jsonsocialcounts.php">see it in action here.</a></p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2011/06/24/get-twitter-and-facebook-link-statistics-with-json-and-jquery/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Tempo: A Tiny JSON Templating Engine</title>
		<link>https://www.webmaster-source.com/2011/04/25/tempo-a-tiny-json-templating-engine/</link>
		<comments>https://www.webmaster-source.com/2011/04/25/tempo-a-tiny-json-templating-engine/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 11:00:52 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[(x)html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3985</guid>
		<description><![CDATA[Tempo is a 4kb JavaScript library that renders JSON into an HTML template. Your script can take something like this&#8230; &#8230;and populate it with JSON data from the Twitter API, which you could load with a couple lines of jQuery. It works with browser as far back as IE6 and doesn&#8217;t require any dependencies. It [&#8230;]]]></description>
				<content:encoded><![CDATA[<p><a href="http://twigkit.github.com/tempo/">Tempo</a> is a 4kb JavaScript library that renders JSON into an HTML template. Your script can take something like this&#8230;</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;ol id=&quot;tweets&quot;&gt;
 &lt;li data-template&gt;
  &lt;img src=&quot;{{profile_image_url}}&quot; /&gt;
  &lt;h3&gt;{{from_user}}&lt;/h3&gt;
  &lt;p&gt;{{text}}&lt;/p&gt;
 &lt;/li&gt;
&lt;/ol&gt;
</pre>
<p>&#8230;and populate it with JSON data from the Twitter API, which you could load with a couple lines of jQuery. It works with browser as far back as IE6 and doesn&#8217;t require any dependencies.</p>
<p>It seems like a friendlier way to deal with JSON data, and it offers the advantage of any templating system: you can separate the logic and data from the presentation.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2011/04/25/tempo-a-tiny-json-templating-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSONView: View JSON Data in Firefox</title>
		<link>https://www.webmaster-source.com/2010/09/24/jsonview-view-json-data-in-firefox/</link>
		<comments>https://www.webmaster-source.com/2010/09/24/jsonview-view-json-data-in-firefox/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 11:47:58 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3590</guid>
		<description><![CDATA[JSON is a popular way to format AJAX responses, as it&#8217;s more compact than XML and essentially a JavaScript object, but it can be a real pain to work with due to uncooperative browsers. It&#8217;s easy enough to view XML in a web browser, which is good for testing, but JSON responses cause a download [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>JSON is a popular way to format AJAX responses, as it&#8217;s more compact than XML and essentially a JavaScript object, but it can be a real pain to work with due to uncooperative browsers. It&#8217;s easy enough to view XML in a web browser, which is good for testing, but JSON responses cause a download prompt to open. This makes it harder to verify that an AJAX request is working properly.</p>
<p>Fortunately, a clever developer has built a Firefox extension to solve this problem. <a href="http://benhollis.net/software/jsonview/">JSONView</a> renders a plain-text representation of the JSON object, complete with indentation and color-coding whenever you access a URL that outputs JSON data. For example, the Twitter API. If you click <a href="http://api.twitter.com/1/statuses/user_timeline/redwall_hp.json">this link</a> in Firefox, you will be prompted to download the file. With JSONView installed, you would see output from the following image.</p>
<p><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-full wp-image-3591" title="JSONView JSON Response" src="//www.webmaster-source.com/wp-content/uploads/jsonview-json-response.png" alt="" width="600" height="365" />If you do much JavaScript work, be sure to <a href="http://benhollis.net/software/jsonview/">install JSONView</a>. It will save you some headaches when you have AJAX requests that aren&#8217;t working quite right.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2010/09/24/jsonview-view-json-data-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress JSON API Plugin</title>
		<link>https://www.webmaster-source.com/2010/06/11/wordpress-json-api-plugin/</link>
		<comments>https://www.webmaster-source.com/2010/06/11/wordpress-json-api-plugin/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 11:16:58 +0000</pubDate>
		<dc:creator><![CDATA[Matt]]></dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[json]]></category>

		<guid isPermaLink="false">http://www.webmaster-source.com/?p=3394</guid>
		<description><![CDATA[WordPress provides an RSS feed for just about every part of the website. You can get XML output for anything, from posts to tags to comments. But what if you&#8217;re working with JavaScript? Wouldn&#8217;t it be nice to have a JSON option? That&#8217;s what the JSON API plugin does. Appending ?json=1 to the end of [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>WordPress provides an RSS feed for just about every part of the website. You can get XML output for anything, from posts to tags to comments. But what if you&#8217;re working with JavaScript? Wouldn&#8217;t it be nice to have a JSON option? That&#8217;s what the <a href="http://wordpress.org/extend/plugins/json-api/">JSON API</a> plugin does. Appending <code>?json=1</code> to the end of any WordPress URL will work like the RSS option, but the feed will be formatted as JSON. It can even be used to submit comments, if you invoke the right method.</p>
<blockquote><p>This plugin was created for The Museum of Modern Art, whose weblog <a href="http://moma.org/explore/inside_out">Inside/Out</a> appears within  an existing structure built with Ruby on Rails. Instead of  reimplementing the site templates as a WordPress theme, we opted for a  Rails front-end that displays content served from a WordPress back-end.  JSON API provides the necessary interface for retrieving content and  accepting comment <a href="http://digwp.com/2010/05/wordpress-json-api-plugin/">submissions.</a></p></blockquote>
<p>I like Chris Coyier&#8217;s suggestion of using it in conjunction with the jQuery UI Autocomplete component in order to add a Google Suggest-type feature to your search form.</p>
<p><a href="http://digwp.com/2010/05/wordpress-json-api-plugin/">WordPress JSON API Plugin</a> [Digging into WordPress]</p>
<p><a href="http://wordpress.org/extend/plugins/json-api/other_notes/">JSON API Usage Guide</a> [JSON API]</p>
]]></content:encoded>
			<wfw:commentRss>https://www.webmaster-source.com/2010/06/11/wordpress-json-api-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/


Served from: www.webmaster-source.com @ 2026-06-10 05:26:20 by W3 Total Cache
-->