Archive for February 12th, 2009

12
Feb

Library: JSON Framework

Here’s a handy library for you if you’re interested in getting into this JSON thing that all the cool kids seem to be excited about these days; the iPhone-friendly JSON Framework, “A strict JSON parser/generator for Objective-C“.

This framework implements a strict JSON parser and generator in Objective-C.

Download the framework, embed it in your application, and import the JSON/JSON.h header. You’re now ready to make your application speak JSON. The framework adds categories to existing Objective-C objects for a super-simple interface, and provides a JSON class for added control.

The author’s blog with release notes is here, and don’t miss the most excellent tutorial at iPhone Developer Tips!

UPDATE 10.07.30:

New JSON library announced today: JSONKit – Yet another JSON library

Not, of course, to be confused with YAJL (Yet Another JSON Library), as found in CocoaREST that we’ve been using for Twitter support.

Mind you, for other JSON needs we’ve been using TouchCode’s TouchJSON, forget why exactly now but probably it was the most developed the first time we had to do iPhone JSON stuff and inertia of library choice tends to continue around here until a compelling reason is found to invest time in deciding whether to fix or switch some problem that shows up.

Also note this post about the benchmarks here, comparing the above mentioned frameworks with Apple’s private JSON library.

And it seems that the commonly known as “SBJSON” project that this was originally about has moved to github, and reportedly will be updated soon.