<?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>“我”的开发笔记 &#187; 13 &#8211; 键值编程（KVC）</title>
	<atom:link href="http://c.gzl.name/archives/category/iphone/kvc/feed" rel="self" type="application/rss+xml" />
	<link>http://c.gzl.name</link>
	<description>IPhone, Cocoa, PHP, Javascript, JQuery, Actionscript, etc...</description>
	<lastBuildDate>Thu, 29 Dec 2011 07:20:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>iPhone上的JSON</title>
		<link>http://c.gzl.name/archives/244</link>
		<comments>http://c.gzl.name/archives/244#comments</comments>
		<pubDate>Sat, 01 Aug 2009 23:35:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[02 - Objective-C]]></category>
		<category><![CDATA[08 - 撤销/错误/KVC]]></category>
		<category><![CDATA[13 - 键值编程（KVC）]]></category>
		<category><![CDATA[Cocoa开发]]></category>
		<category><![CDATA[iPhone开发]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[KeyValueCoding]]></category>
		<category><![CDATA[NSDictionary]]></category>

		<guid isPermaLink="false">http://c.gzl.name/?p=244</guid>
		<description><![CDATA[JSON我就不多解释了，需要更多信息的朋友请到json.org上查看。 在iPhone上访问网络内容是很必须的，而一些数据就需要以某种形式储存在web服务器上。比如一个app的目录，内容，索引等等。而xml和json，plist都是比较方便的方式。 -XML在iPhone上是非常好用的，但是对复杂的数据结构使用上就不那么方便了，具体可以参阅苹果的“基于事件的XML”和“基于树的XML”编程向导 -plist是再方便不过了，不过我看最多也就是一个NSDictionary而已，复杂一些的话，数据输入上也会非常非常的麻烦。 -JSON本来是不被苹果支持的，但是有人很Nice的帮我们解决了这个问题：JSON for OBJC http://code.google.com/p/json-framework/ 基本上来说，这个框架异常的简单易用，会将得到的json字符串处理成一个复杂NSDictionary对象，而每一个值都还是一个NSDictionary对象 比如： { &#34;华藏净宗学会&#34;: { &#34;zhaomu&#34;: { &#34;name&#34;:&#34;净宗朝暮课本&#34;, &#34;length&#34;:142, &#34;digits&#34;:3 }, &#34;kesong&#34;: { &#34;name&#34;:&#34;净宗共修课本&#34;, &#34;length&#34;:75, &#34;digits&#34;:2 } }, &#34;生命基金会&#34;: { &#34;dabei88&#34;: { &#34;name&#34;:&#34;大悲出相图&#34;, &#34;length&#34;:88, &#34;digits&#34;:2 } } } 就会转换为一个复杂无比的NSDictionary： &#91;&#91;NSDictionary alloc&#93; initWithObjects:&#91;NSArray arrayWithObjects: &#91;NSDictionary dictionaryWithObjects:&#91;NSArray arrayWithObjects: &#91;NSDictionary dictionaryWithObjects:&#91;NSArray arrayWithObjects: @&#34;净宗朝暮课本&#34;, @&#34;142&#34;, @&#34;3&#34;,nil&#93; forKeys: &#91;NSArray arrayWithObjects: @&#34;name&#34;, @&#34;length&#34;, [...]]]></description>
		<wfw:commentRss>http://c.gzl.name/archives/244/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

