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.

JSON.png

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: , ,

5 Responses to “Open Source iPhone – JSON Data”

  1. Luke Redpath Says:

    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

  2. Corey Says:

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

  3. Luke Redpath Says:

    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.

  4. Dave Martorana Says:

    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

  5. Corey Says:

    @Dave
    Thanks, I’ll check it out.
    …probably should have given a shout out to my IndyHall peeps in the first place.

Leave a Reply