<?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>rel=me &#187; json</title>
	<atom:link href="http://rel.me/t/json/feed/" rel="self" type="application/rss+xml" />
	<link>http://rel.me</link>
	<description>programming, objective-c, cocoa, iphone, c</description>
	<lastBuildDate>Wed, 01 Feb 2012 07:26:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>JSON Parsing Speed Test: YAJL vs SBJSON (iPhone Edition)</title>
		<link>http://rel.me/2009/10/08/json-parsing-speed-test-yajl-vs-sbjson-iphone/</link>
		<comments>http://rel.me/2009/10/08/json-parsing-speed-test-yajl-vs-sbjson-iphone/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 06:18:57 +0000</pubDate>
		<dc:creator>gabe</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[sbjson]]></category>
		<category><![CDATA[yajl]]></category>

		<guid isPermaLink="false">http://rel.me/?p=255</guid>
		<description><![CDATA[I was curious about the difference, if any, in performance between SBJSON and YAJL with Objective-C bindings. SBJSON is a strict JSON parser written in Objective-C. YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C. Awhile back I wrote YAJL Objective-C bindings and I did some very basic speed tests on JSON [...]]]></description>
			<content:encoded><![CDATA[<p>I was curious about the difference, if any, in performance between SBJSON and YAJL with Objective-C bindings. <a href="http://code.google.com/p/json-framework/">SBJSON</a> is a strict JSON parser written in Objective-C. <a href="http://lloyd.github.com/yajl/">YAJL</a> is a small event-driven (SAX-style) JSON parser written in ANSI C. Awhile back I wrote <a href="http://github.com/gabriel/yajl-objc">YAJL Objective-C bindings</a> and I did some very basic speed tests on JSON data from twitter, delicious, last.fm and yelp. I ran these tests on the original, 3G and 3GS iPhones. </p>
<p>The SBJSON test ran <code>NSString#JSONValue</code>, and the equivalent YAJL test ran <code>NSData#yajl_JSON</code>. The YAJL bindings operate directly on NSData, and this makes a bit more sense since we usually have NSData first, whereas for SBJSON you have to decode to a string before parsing. I <strong>didn&#8217;t</strong> include this difference in my tests though.</p>
<p>These are tests of parsing only (and not loading of any data or strings) of the 4 APIs datasets run 100 times on the original iPhone, 3G and 3GS:</p>
<hr/>
<img src="http://rel.me/wp-content/uploads/2009/10/iphone.png" alt="iphone" title="iphone" width="575" height="320" class="aligncenter size-full wp-image-286" /></p>
<hr/>
<img src="http://rel.me/wp-content/uploads/2009/10/iphone3g.png" alt="iphone3g" title="iphone3g" width="595" height="320" class="aligncenter size-full wp-image-285" /></p>
<hr/>
<img src="http://rel.me/wp-content/uploads/2009/10/iphone3gs.png" alt="iphone3gs" title="iphone3gs" width="503" height="320" class="aligncenter size-full wp-image-284" /></p>
<hr/>
<p>So the YAJL framework gives about a 60% speed increase. The YAJL Objective-C bindings can be found on <a href="http://github.com/gabriel/yajl-objc">github</a>.</p>
<p>Be sure to thank <a href="http://twitter.com/lloydhilaiel">@lloydhilaiel</a> for making <a href="http://lloyd.github.com/yajl/">YAJL</a> full of so much awesomeness.</p>
<p><b>Update</b>: The project used to do the perf test can be found <a href="http://github.com/gabriel/json-objc-perf">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://rel.me/2009/10/08/json-parsing-speed-test-yajl-vs-sbjson-iphone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>YAJL JSON Parser (Objective-C Bindings)</title>
		<link>http://rel.me/2009/06/15/yajl-json-parser-objective-c-bindings/</link>
		<comments>http://rel.me/2009/06/15/yajl-json-parser-objective-c-bindings/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 07:27:18 +0000</pubDate>
		<dc:creator>gabe</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[yajl]]></category>

		<guid isPermaLink="false">http://rel.me/?p=238</guid>
		<description><![CDATA[I recently was investigating using a more lightweight JSON parser for iPhone projects (other than the standard SBJSON library) and came across the YAJL C JSON library. While using it as a document style parser didn&#8217;t result in a huge performance gain, it does a support a streaming &#8220;SAX&#8221; style parser which might help memory [...]]]></description>
			<content:encoded><![CDATA[<p>I recently was investigating using a more lightweight JSON parser for iPhone projects (other than the standard <a href="http://code.google.com/p/json-framework/">SBJSON</a> library) and came across the <a href="http://lloyd.github.com/yajl/">YAJL</a> C JSON library. While using it as a document style parser didn&#8217;t result in a huge performance gain, it does a support a streaming &#8220;SAX&#8221; style parser which might help memory usage in larger documents.</p>
<p>Hopefully, sometime soon I will do some performance comparisons. In the meantime, if you try these bindings, let me know how it goes. You can find it on github at: <a href="http://github.com/gabriel/yajl-objc">http://github.com/gabriel/yajl-objc</a>.</p>
<p>Right now, I only have a framework (for 10.5) built, but check back and at some point will have a static iPhone library built as well.</p>
<p>Here are some quick usage examples:</p>
<h3>Usage</h3>
<p><script src="http://gist.github.com/138679.js"></script></p>
<h3>Usage (Streaming)</h3>
<p><script src="http://gist.github.com/138680.js"></script></p>
<h3>Usage (Document style)</h3>
<p><script src="http://gist.github.com/138682.js"></script></p>
<p><b>Updated</b> (07/01/2009): Updated usage to use new API changes for better streaming support.</p>
]]></content:encoded>
			<wfw:commentRss>http://rel.me/2009/06/15/yajl-json-parser-objective-c-bindings/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

