I have an object c code connecting to a web server returning an xml.
after, I put the result into an NSDictionary:
self.xmlDictionary = [XMLReader dictionaryForXMLString:self.theXML options:XMLReaderOptionsProcessNamespaces error:&parseError];
NSLog(@"%@", self.xmlDictionary);
If my JSON returns more than 1 object my code counts the objects perfectly. But if my JSON returns only ONE object it miscounts.
My guess is the parenthesis are not inserted when only one value is returned.
Check my stack with complete code please:
http://stackoverflow.com/questions/33659623/objective-c-miscounting-array-with-json
I have an object c code connecting to a web server returning an xml.
after, I put the result into an NSDictionary:
self.xmlDictionary = [XMLReader dictionaryForXMLString:self.theXML options:XMLReaderOptionsProcessNamespaces error:&parseError];
NSLog(@"%@", self.xmlDictionary);
If my JSON returns more than 1 object my code counts the objects perfectly. But if my JSON returns only ONE object it miscounts.
My guess is the parenthesis are not inserted when only one value is returned.
Check my stack with complete code please:
http://stackoverflow.com/questions/33659623/objective-c-miscounting-array-with-json