SVA
SVA

Reputation: 883

Web services on iPhone

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

Upvotes: 1

Views: 358

Answers (4)

Anshul
Anshul

Reputation: 244

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

Upvotes: 0

Andrew
Andrew

Reputation: 11

NSXMLParser is the best, you can use it easily.

Upvotes: 0

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).

Upvotes: 2

kennytm
kennytm

Reputation: 523214

(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).

Upvotes: 0

Related Questions