Alex Rivera | Logout

Comparison of JSON Parser for Objective-C (JSON Framework, YAJL, TouchJSON, etc)

Asked 2010-02-13T05:46:10.213
141

As far as I know, there are three JSON Parsers for Objective-C, JSON Framework, YAJL, and Touch JSON. Then, These three would have their own characteristics.

For example:
YAJL can be used as a SAX style parser.
JSON Framework has relatively long history and is widely used.
Touch JSON parses NSData instead of NSString.

In addition, as far as I tested, the result of performance comparison is as follows:
[fast] YAJL > JSON Framework > Touch JSON [slow].

If you know pros and cons of these JSON parsers, could you tell me?
Lastly, if you know any other JSON Parser, please tell me.

Edit
Report

2 Answers

5

There's also this parser:

I don't remember how I stumbled upon this one, but it looked lightweight and simple, so I thought that it suits my needs. I event forked it in order to add initialization from NSData. As I needed to parse small responses, I didn't care about the performance. It would be interesting to know how it performs though.

answered 2010-09-27T10:36:26.927
0

Why not have a look at akosma's benchmarks on parsers where he compares different kinds of parsers. If one parser is missing, you might as well add it to the tests, since his code is open source.

iPhoneWebServicesClient

answered 2011-02-10T21:13:58.207

Your Answer