What is the preferred datatype to parse JSON into in Objective-C? I’m looking for a data type that mirrors the ability to use key=>value style and just array form.
What is the preferred datatype to parse JSON into in Objective-C? I’m looking for
Share
Typically libraries (such as SBJson) will return their parsed results as either an
NSArrayor anNSDictionary, just depending on if the parsed JSON element was an object or an array.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
NSDictionary.