I need to send the following JSON array via POST to our server:
task:{"id":"123","list":"456","done":1,"done_date":1305016383}
I tried with the JSON library, but I was somehow to stupid to use it. I even tried to build up the POST-String by myself, but also failed:
NSString *post = @"task='{id:123,list:456,done:1,done_date:1305016383}'";
NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:url
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:30];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[post dataUsingEncoding:NSUTF8StringEncoding]];
....
Can you please help me? The json’ed POST string would be even enough for me :)