I\'m using JSON-Framework in my project successfully to decode JSON send from a server.
Now I need to do it the other way around and I\'m facing problems as the data
This is an example of sending dictionary and array to server.which worked for me 1000000% .
SBJSON *jparser = [[SBJSON new] autorelease];
NSString *ArrayjsonItems = [jparser stringWithObject:self.UrMergedArray];
NSString *DicjsonItems = [jparser stringWithObject:self.UrMergedDic];
NSLog(@"array Items :%@",self.UrMergedArray);
NSLog(@"dic Items :%@",self.UrMergedDic);
NSString *postString =[NSString stringWithFormat:@"Arrayitems=%@&Dicitems=%@",ArrayjsonItems,DicjsonItems];
NSLog(@"it is going to post : %@ \n\n",postString);
NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:snapURL];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[postString dataUsingEncoding:NSUTF8StringEncoding]];
NSURLConnection *connection=[[NSURLConnection alloc]
initWithRequest:request
delegate:self];
if (connection) {
self.receivedData = [[NSMutableData alloc]init];
}