<?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>Navarr&#039;s Tech Side &#187; JSON</title>
	<atom:link href="http://tech.navarr.me/topics/code/json/feed" rel="self" type="application/rss+xml" />
	<link>http://tech.navarr.me</link>
	<description>The Technical Side of my Life</description>
	<lastBuildDate>Tue, 07 Feb 2012 22:32:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<cloud domain='tech.navarr.me' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>How to Retrieve a Zipcode Using JavaScript</title>
		<link>http://tech.navarr.me/2010/02/how-to-retrieve-a-zipcode-using-javascript.html</link>
		<comments>http://tech.navarr.me/2010/02/how-to-retrieve-a-zipcode-using-javascript.html#comments</comments>
		<pubDate>Thu, 25 Feb 2010 16:59:51 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[geocoding]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[reverse geocoding]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/?p=375</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<pre><div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://tech.navarr.me/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Retrieve user’s Zipcode</span>
<span style="color: #006600; font-style: italic;">// Demo at http://sandbox.gtaero.net/zipcode.html</span>
<span style="color: #003366; font-weight: bold;">function</span> retrieve_zip<span style="color: #009900;">&#40;</span>callback<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>google<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> google <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span><span style="color: #009900;">&#40;</span>err<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> google <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// Stupid Exceptions</span>
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">geolocation</span><span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// FireFox/HTML5 GeoLocation</span>
	<span style="color: #009900;">&#123;</span>
		navigator.<span style="color: #660066;">geolocation</span>.<span style="color: #660066;">getCurrentPosition</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>position<span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			zip_from_latlng<span style="color: #009900;">&#40;</span>position.<span style="color: #660066;">coords</span>.<span style="color: #660066;">latitude</span><span style="color: #339933;">,</span>position.<span style="color: #660066;">coords</span>.<span style="color: #660066;">longitude</span><span style="color: #339933;">,</span>callback<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>google <span style="color: #339933;">&amp;&amp;</span> google.<span style="color: #660066;">gears</span><span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// Google Gears GeoLocation</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> geloc <span style="color: #339933;">=</span> google.<span style="color: #660066;">gears</span>.<span style="color: #660066;">factory</span>.<span style="color: #660066;">create</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'beta.geolocation'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		geloc.<span style="color: #660066;">getPermission</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		geloc.<span style="color: #660066;">getCurrentPosition</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>position<span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			zip_from_latlng<span style="color: #009900;">&#40;</span>position.<span style="color: #660066;">latitude</span><span style="color: #339933;">,</span>position.<span style="color: #660066;">longitude</span><span style="color: #339933;">,</span>callback<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>err<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> zip_from_latlng<span style="color: #009900;">&#40;</span>latitude<span style="color: #339933;">,</span>longitude<span style="color: #339933;">,</span>callback<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// Setup the Script using Geonames.org's WebService</span>
		<span style="color: #003366; font-weight: bold;">var</span> script <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;script&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		script.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://ws.geonames.org/findNearbyPostalCodesJSON?lat=&quot;</span> <span style="color: #339933;">+</span> latitude <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;lng=&quot;</span> <span style="color: #339933;">+</span> longitude <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;callback=&quot;</span> <span style="color: #339933;">+</span> callback<span style="color: #339933;">;</span>
	<span style="color: #006600; font-style: italic;">// Run the Script</span>
		document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;head&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>script<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> example_callback<span style="color: #009900;">&#40;</span>json<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// Now we have the data!  If you want to just assume it's the 'closest' zipcode, we have that below:</span>
	zip <span style="color: #339933;">=</span> json.<span style="color: #660066;">postalCodes</span><span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">postalCode</span><span style="color: #339933;">;</span>
	country <span style="color: #339933;">=</span> json.<span style="color: #660066;">postalCodes</span><span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">countryCode</span><span style="color: #339933;">;</span>
	state <span style="color: #339933;">=</span> json.<span style="color: #660066;">postalCodes</span><span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">adminName1</span><span style="color: #339933;">;</span>
	county <span style="color: #339933;">=</span> json.<span style="color: #660066;">postalCodes</span><span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">adminName2</span><span style="color: #339933;">;</span>
	place <span style="color: #339933;">=</span> json.<span style="color: #660066;">postalCodes</span><span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">placeName</span><span style="color: #339933;">;</span>
	<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>zip<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
retrieve_zip<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;example_callback&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Alert the User's Zipcode</span></pre></div></div></pre>
]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2010/02/how-to-retrieve-a-zipcode-using-javascript.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why I now Prefer JSON to RSS/XML</title>
		<link>http://tech.navarr.me/2009/11/why-i-now-prefer-json-to-rssxml.html</link>
		<comments>http://tech.navarr.me/2009/11/why-i-now-prefer-json-to-rssxml.html#comments</comments>
		<pubDate>Thu, 26 Nov 2009 19:42:54 +0000</pubDate>
		<dc:creator>Navarr</dc:creator>
				<category><![CDATA[JSON]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://tech.gtaero.net/2009/11/why-i-now-prefer-json-to-rssxml.html</guid>
		<description><![CDATA[This might mainly be a “call-out” to Dave Winer, since he is continually attempting to push RSS for all sorts of data that should be inherited around the web – although, he has stated before that he likes JSON – I think – My memory is not so good, even my girlfriend has been complaining [...]]]></description>
			<content:encoded><![CDATA[<p>This might mainly be a “call-out” to Dave Winer, since he is continually attempting to push RSS for all sorts of data that should be inherited around the web – although, he has stated before that he likes JSON – I think – My memory is not so good, even my girlfriend has been complaining about it.</p>
<p>Either way, I’m just going to take a small amount of time here to list why I no longer like XML and RSS for portable data.</p>
<p>It’s too low-level.</p>
<p>XML and RSS are a markup language, of course.&#160; It’s very low-level code, and is generally a pain to parse in <strong>any</strong> language.&#160; Which is why I prefer JSON.</p>
<p>It’s high-level code.</p>
<p>JSON is a very simple object – It’s basically an array of data.&#160; Here is some XML vs. JSON:</p>
<p><strong>XML</strong></p>
</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">data</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">user</span> <span style="color: #ff0000">id</span><span style="color: #0000ff">=&quot;876232&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">name</span><span style="color: #0000ff">&gt;</span>User Name<span style="color: #0000ff">&lt;/</span><span style="color: #800000">name</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">screenName</span><span style="color: #0000ff">&gt;</span>User<span style="color: #0000ff">&lt;/</span><span style="color: #800000">screenName</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">user</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">data</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p><strong>JSON</strong></p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #006080">&quot;user&quot;</span>:[<span style="color: #006080">&quot;id&quot;</span>:876232,<span style="color: #006080">&quot;name&quot;</span>:<span style="color: #006080">&quot;User Name&quot;</span>,<span style="color: #006080">&quot;screenName&quot;</span>:<span style="color: #006080">&quot;User&quot;</span>]</pre>
<p><!--CRLF--></div>
</div>
<p>Even though you can get similar results by making id its own tag in the XML, its still difficult to parse.&#160; Where as with JSON, the data is already formatted and easily accessible.&#160; Especially in my favorite language, PHP.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #008000">// For Json</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    $json = json_decode($data,TRUE); <span style="color: #008000">// Decodes JSON and makes it a true array</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    $id = $json[<span style="color: #006080">&quot;user&quot;</span>][<span style="color: #006080">&quot;id&quot;</span>];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    $name = $json[<span style="color: #006080">&quot;user&quot;</span>][<span style="color: #006080">&quot;name&quot;</span>];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #008000">// For XML</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    $xml = <span style="color: #0000ff">new</span> SimpleXML($data);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    $id = $xml-&gt;user[<span style="color: #006080">&quot;id&quot;</span>];</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    $name = $xml-&gt;user-&gt;name;</pre>
<p><!--CRLF--></div>
</div>
<p>The two are very close, but in the end JSON is more simplistic – because its such a high-level language.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.navarr.me/2009/11/why-i-now-prefer-json-to-rssxml.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

