yokks
yokks

Reputation: 5773

parsing xml to json in iphone

Am writing one small application to parse from XML to JSON object for iphone. can anyone tell me the availability of open source library present to do the parsing usnig objective-c.

Upvotes: 0

Views: 3438

Answers (3)

Sylverb
Sylverb

Reputation: 939

There are plenty of open source solutions in objective-c to deal with JSON :

To deal with xml, you can use the default NSXMLParser class or some other solutions like some code I've posted here (DOM parser) : NSXMLParser retrieving wrong data from XML tags

You can also check this page which will give you a good overview of available solutions for XML parsing (and an explaination of differences between SAX and DOM parsers) : http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project

Upvotes: 3

Andrew
Andrew

Reputation: 8563

I use NSPropertyListSerialization from Apple to turn a Plist XML into a dictionary. Then we just need to find something to go from dictionary to JSON.

The json-framework looks like a nice JSON generator.

Upvotes: 0

Praveen S
Praveen S

Reputation: 10393

Well there is a json parser available for objective c on github. Its very simple to use. You may have to write some additional code to provide input to the parser.

Upvotes: 0

Related Questions