Cocoa JSON - Check whether array or dictionary

Posted by Craig on Stack Overflow See other posts from Stack Overflow or by Craig
Published on 2009-10-13T14:18:59Z Indexed on 2010/05/27 19:01 UTC
Read the original article Hit count: 246

Filed under:
|

Hi,

I am using the Cocoa JSON framework ( http://code.google.com/p/json-framework/ ) to communicate with an API.

The problem is that the API returns a dictionary if there is an error but returns an array of the results if it works.

Is there a good way to detect if the JSONValue is an array or a dictionary?

Thanks.

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about JSON