Thursday, 22 August 2013

Why my JSON can't successfully parse to a NSDictionary

Why my JSON can't successfully parse to a NSDictionary

Here is my code:
decodeMenuValue = @"{\"receipts\":[\"Mother\",\"Father\",\"Grand
Parent\",\"Carer\"]}";
NSError *e = nil;
NSObject *jsonObj = [NSJSONSerialization
JSONObjectWithData:[decodeMenuValue JSONData]
options:NSJSONReadingMutableContainers
error:&e];
I got an NSCocoaErrorDomain what does it means? And why it is happen? Thanks.

No comments:

Post a Comment