You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I am going to parse above xml in to dictionary I will get "Item" as an Array. But if there is only single element of "Item" it will be consider as a dictionary. It happen many times when there is a case of getting a single element in array and other time it has multiple elements, e.g location kind of APIs.
How can I manage this case with my objective-c property type? In above case if I take "Item" as NSArray type and in response if I get only single element of "Item" it will be converted to NSDictionary type, and I will get a crash in this case.
Please help me in above scenario and guide me if my understating is not proper.
The text was updated successfully, but these errors were encountered:
Hi,
I am facing an issue while parsing an array with single element in XML. Please refer below example for more details.
If I am going to parse above xml in to dictionary I will get "Item" as an Array. But if there is only single element of "Item" it will be consider as a dictionary. It happen many times when there is a case of getting a single element in array and other time it has multiple elements, e.g location kind of APIs.
How can I manage this case with my objective-c property type? In above case if I take "Item" as NSArray type and in response if I get only single element of "Item" it will be converted to NSDictionary type, and I will get a crash in this case.
Please help me in above scenario and guide me if my understating is not proper.
The text was updated successfully, but these errors were encountered: