Deserializing a complex JSON result (array of dictionaries) with TouchJSON

I'm the author of TouchJSON.

Your outermost object should be a dictionary and NOT an array. Anything other than a dictionary is not legal. If you have to have an array as the outermost object then use the method (which is technically deprecated, but isn't going any where soon)

- (id)deserialize:(NSData *)inData error:(NSError **)outError;

See: http://www.json.com/json-schema-proposal/ for more information abotu what is and is not legal JSON.


This isn't an answer, but a pointer to a different framework:

http://code.google.com/p/json-framework/

I've been using it quite a bit lately, serializing and de-serializing complex data structures from third-party services such as Google Local and between my own Objective-C and Perl code with absolutely no problems. Not to mention that the API is ridiculously easy to deal with.

Good luck!