i am using JSON webservices in my project.i parse the json method and collect the data and display it whereever it is required.
In JSON method will be of two types,one is simple array
{ } // we use NSdictionary here to collect the data
Another is of this format
{“abc” [ {} ] } // we use NSArray to collect the data
What my question is we write the code in our project before itself just linking up to webservices,whatever data we require that we will mention and collect the data.
For example we use NSDictionary in our code thinking json method is of { } format. if later json method changes to { [ {} ] } according to the services added at the client side then how do we differenciate and write our code whethere the incoming json method is of NSArray or NSDicationary.
simply