I have to send the following JSON data in request for a web service. So how can I create the following type of JSON using iOS/objective C:
{
"version": "1.0",
"myData": [
{
"name": "",
"value": [
{
"time": "1-JAN-2013 14:30:00 IST",
"values": [
{
"name": "",
"value": ""
}
]
}]
}]
}
I tried :
NSDictionary* version = [NSDictionary dictionaryWithObjectsAndKeys:
[1.0 objectForKey:@"version"], [NSArray objectForKey:@"observations"]
Am I missing something ?
NSJSONSerializationof NSJSon object. And what you're trying to achieve forversion.