i'm porting my really simple app from javascript (embedded in an app) to ios8/swift and Xcode. The app will insert some simple event in google calendar using CalendarApiV3.
In javascript it was easy to create a simple data structure to pass in a http POST request, like this structure :
var data:struct =
{
"end": {
"dateTime": "20141223T12:25:00Z"
},
"start": {
"dateTime": "20141223T10:25:00Z"
},
"summary": "description of event",
"reminders": {
"useDefault": false,
"overrides": [
{
"method": "sms",
"minutes": "60"
},
{
"method": "email",
"minutes": "60"
}
]
}
};
Ok, how to re-create the some structure in Swift ? I ended up looking for swifty json, but they all tell me how to PARSE json requested, not how to FORM a json request. I hope i was clear.
Thanks in advance.
Victor