Open Source iPhone – JSON Data
I’ve used/repurposed several open source projects for use in my code.
If you’re not trying to use someone else’s code as much as possible, you’re not doing OOP.
I won’t call this a series, but I would like to showcase some of the great code that is out there waiting to be used. All you have to do is drop it in your project.
This time I’ll point out a framework that I use very frequently:
json-framework (available on Google Code)
It’s drop dead simple to use. You give it data, it gives you a Cocoa Object, end of story.
Here is how I use json-framework in some of my code.

The SBJSON class gives you back a NSArray, NSDictionary, or an NSError (pointer reference).
If you need to parse JSON data, check it out.
Tags: development, iPhone, open source
July 24th, 2009 at 12:58 pm
I don’t know how they really compare, but another good JSON library for the iPhone is TouchJSON: http://code.google.com/p/touchcode/wiki/TouchJSONHowTo
July 24th, 2009 at 2:07 pm
@Luke
Yeah TouchJSON is another similar library. There are several discussions strewn about the intertubes asking which one is better. I believe the usual comparison is that TouchJSON is more mature/stable and json-framework is simpler to use. But to be honest, I haven’t used TouchJSON, so I don’t know for sure.
July 24th, 2009 at 2:51 pm
I have used json-framework before but switched over to TouchJSON because I thought it was easier to use, funnily enough. At least, its a lot easier to get it into your project quickly as you just need to copy the source over (three classes).
Like you, I don’t know which one is the best, at least from a purely technical/performance point of view.
August 5th, 2009 at 9:24 pm
Check out JSONKit – a freebie to come out of IndyHall Labs. We use it in all of the software we produce – and then some
http://github.com/IndyHallLabs/jsonkit/tree/master
August 5th, 2009 at 9:52 pm
@Dave
Thanks, I’ll check it out.
…probably should have given a shout out to my IndyHall peeps in the first place.