This code has been made redundant by: TouchJSON
Blake Seely released some code yesterday to convert Cocoa datatypes to JSON. I’ve had similar code that I’ve been meaning to put online for a while now. So now the world has gone from zero to two Cocoa code-bases to read/write JSON.
The code is in subversion here, and an archived version can be downloaded here: CocoaJSON.zip. The code is standalone and some unit tests are provided.