The title is really my question. I'm looking for a data type that mirrors the ability to use key=>value
style and just array form. Please don't downvote before asking questions, its a little vague but i can answer questions just fine.
| |||
feedback
|
Typically libraries (such as SBJson) will return their parsed results as either an From SBJsonParser.h:
In your question you asked "I'm looking for a data type that mirrors the ability to use key=>value", that is by definition exactly what a dictionary is... so, you're probably looking for | |||||
feedback
|
The question doesn't make any sense. The JSON string itself determines what type of object you are going to get when it's deserialized. It can be a string, number, array or dictionary. You have to be prepared to receive any of those. If you use NSJSONSerialization, you'll notice that the decoding methods return id, which means you don't know the type ahead of time. You will have to use isKindOfClass: to figure out what you actually got back. | |||
feedback
|