Actually in getting JSON data from a sql server in a encypted format and i decrypt the json data and stored in a NSString. So i have to copy the stored json string to a NSDictionary. So that i can able to call each and every data using valueForKeys.
NSString *requestMode = @"Hello buddy";
NSMutableURLRequest* request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://funsip.com/interaction_demo.php?requestMode=LIBRARY&categoryid=3"]];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[requestMode dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:NO]];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
NSError *err = nil;
NSHTTPURLResponse* response = nil;
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&err ];
if (err != nil) { NSLog(@"Failed"); }
NSString* answernew = [[NSMutableString alloc] initWithData:data encoding:NSUTF8StringEncoding]; `
so i want to copy the ansernew string to a NSDictionary.
Thanks in advance K.Karthik