Thursday, 5 September 2013

Getting Dictionary From JSON

Getting Dictionary From JSON

I am trying to get Dictionary form json, but the following code dosent
seem to work. I am getting the JSON, but cannot get the dictionary from
it.
NSString *str = [[NSMutableString alloc] initWithData:responseCust
encoding:NSUTF8StringEncoding];
NSLog(@"CUSTOMER string -----################ %@", str);
if(str.length>5)
{
SBJSON *jsonparser=[[SBJSON alloc]init];
NSDictionary *res= [jsonparser objectWithString:str];
NSLog(@"Contants Results %@",res);
[jsonparser release];
[str release];
Thank You.

No comments:

Post a Comment