开发者

Web services on iPhone

开发者 https://www.devze.com 2022-12-17 01:46 出处:网络
Which is better to parse JSON/XML on iPhone, so that i can interact with web apps. Also开发者_JS百科 which is the fastest and most efficient parser out thereTouchJSON is easier for the developer to us

Which is better to parse JSON/XML on iPhone, so that i can interact with web apps. Also开发者_JS百科 which is the fastest and most efficient parser out there


TouchJSON is easier for the developer to use than XML parsing, for web services with lots of little files sent back and forth performance does not matter much because the bottleneck will be the network (unless for some reason you are sending very large data structures around).


(See other comment for AppStore apps.)

JSON: For Jailbroken platforms you can use Apple's private framework JSON.framework. (Isn't it quite sad that Apple often needs developers to reinvent the wheels?)

XML: NSXMLParser (which is more ObjC-friendly) or libxml2 (which has higher performance).


NSXMLParser is the best, you can use it easily.


Both has its own advantages. XML is more structured and organized than JSON. if you have complex data structure than use XML otherwise you can use JSON.

For XML you can use: NSXMLParser or GDataXMLParser
For JSON try: SBJSON

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号