Hello,
Even if I was doing research, I could not find anything to help me in my situation.
So, I am trying to parse the Json generated by the php script on xcode, but I have an error that blocks the process.
I am a beginner, so I tried to do my best for the layout of my question ...
My mistake:
[376:70b] Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn't be completed. (Cocoa error 3840.)" (Garbage at end.) UserInfo=0x8bc0f70 {NSDebugDescription=Garbage at end.
My code is:
NSData *jsonSource = [NSData dataWithContentsOfURL: [NSURL URLWithString:@"http://codlobbyz.com/app/service.php"]]; NSError *err; id jsonObjects = [NSJSONSerialization JSONObjectWithData: jsonSource options:NSJSONReadingMutableContainers error:&err]; NSLog(@"%@", err);
My json:
[{"nom":"Call of duty ghost","date":"22 novembre","image":"appicon.png"},{"nom":"Fifa 14","date":"22 novembre","image":"appicon.png"}]
Hope you can help me, thanks for your answers.
json ios objective-c parsing
Jopolaz
source share