Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Visual FoxPro) Google Calendar -- Generate Event JSONSee more Google Calendar ExamplesDemonstrates how to generate the JSON for an event resource. This code can be used as a template for generating JSON to insert new events. See https://developers.google.com/google-apps/calendar/v3/reference/events#resource for details about the Calender Event Resource JSON.
LOCAL loJson * This example (below) generates the following JSON: * Note: Your application code would construct the event JSON using your * desired subset of members. For boolean values, you would pass 1 or 0. * For date or date/time values, you would pass the appropriately formatted date/time string. * { * "kind": "calendar#event", * "etag": "some_etag", * "id": "string value", * "status": "string value", * "htmlLink": "string value", * "created": "datetime value", * "updated": "datetime value", * "summary": "string value", * "description": "string value", * "location": "string value", * "colorId": "string value", * "creator": { * "id": "string value", * "email": "string value", * "displayName": "string value", * "self": true * }, * "organizer": { * "id": "string value", * "email": "string value", * "displayName": "string value", * "self": true * }, * "start": { * "date": "date value", * "dateTime": "datetime value", * "timeZone": "string value" * }, * "end": { * "date": "date value", * "dateTime": "datetime value", * "timeZone": "string value" * }, * "endTimeUnspecified": true, * "recurrence": [ * "string value" * ], * "recurringEventId": "string value", * "originalStartTime": { * "date": "date value", * "dateTime": "datetime value", * "timeZone": "string value" * }, * "transparency": "string value", * "visibility": "string value", * "iCalUID": "string value", * "sequence": 1234, * "attendees": [ * { * "id": "string value", * "email": "string value", * "displayName": "string value", * "organizer": true, * "self": true, * "resource": true, * "optional": true, * "responseStatus": "string value", * "comment": "string value", * "additionalGuests": 1234 * }, * { * "id": "string value", * "email": "string value", * "displayName": "string value", * "organizer": true, * "self": true, * "resource": true, * "optional": true, * "responseStatus": "string value", * "comment": "string value", * "additionalGuests": 1234 * } * ], * "attendeesOmitted": true, * "extendedProperties": { * "private": { * "someKey": "string value" * }, * "shared": { * "someKey": "string value" * } * }, * "hangoutLink": "string value", * "gadget": { * "type": "string value", * "title": "string value", * "link": "string value", * "iconLink": "string value", * "width": 1234, * "height": 1234, * "display": "string value", * "preferences": { * "someKey": "string value" * } * }, * "anyoneCanAddSelf": true, * "guestsCanInviteOthers": true, * "guestsCanModify": true, * "guestsCanSeeOtherGuests": true, * "privateCopy": true, * "locked": true, * "reminders": { * "useDefault": true, * "overrides": [ * { * "method": "string value", * "minutes": 1234 * } * ] * }, * "source": { * "url": "string value", * "title": "string value" * }, * "attachments": [ * { * "fileUrl": "string value", * "title": "string value", * "mimeType": "string value", * "iconLink": "string value", * "fileId": "string value" * }, * { * "fileUrl": "string value", * "title": "string value", * "mimeType": "string value", * "iconLink": "string value", * "fileId": "string value" * } * ] * } * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject') loJson = CreateObject('Chilkat.JsonObject') loJson.UpdateString("kind","calendar#event") loJson.UpdateString("etag","some_etag") loJson.UpdateString("id","string value") loJson.UpdateString("status","string value") loJson.UpdateString("htmlLink","string value") loJson.UpdateString("created","datetime value") loJson.UpdateString("updated","datetime value") loJson.UpdateString("summary","string value") loJson.UpdateString("description","string value") loJson.UpdateString("location","string value") loJson.UpdateString("colorId","string value") loJson.UpdateString("creator.id","string value") loJson.UpdateString("creator.email","string value") loJson.UpdateString("creator.displayName","string value") loJson.UpdateBool("creator.self",1) loJson.UpdateString("organizer.id","string value") loJson.UpdateString("organizer.email","string value") loJson.UpdateString("organizer.displayName","string value") loJson.UpdateBool("organizer.self",1) loJson.UpdateString("start.date","date value") loJson.UpdateString("start.dateTime","datetime value") loJson.UpdateString("start.timeZone","string value") loJson.UpdateString("end.date","date value") loJson.UpdateString("end.dateTime","datetime value") loJson.UpdateString("end.timeZone","string value") loJson.UpdateBool("endTimeUnspecified",1) loJson.UpdateString("recurrence[0]","string value") loJson.UpdateString("recurringEventId","string value") loJson.UpdateString("originalStartTime.date","date value") loJson.UpdateString("originalStartTime.dateTime","datetime value") loJson.UpdateString("originalStartTime.timeZone","string value") loJson.UpdateString("transparency","string value") loJson.UpdateString("visibility","string value") loJson.UpdateString("iCalUID","string value") loJson.UpdateNumber("sequence","1234") loJson.UpdateString("attendees[0].id","string value") loJson.UpdateString("attendees[0].email","string value") loJson.UpdateString("attendees[0].displayName","string value") * Note: We could alternately specify an index using "i", which allows * for an application to construct using a loop with a variable.. loJson.I = 0 loJson.UpdateBool("attendees[i].organizer",1) loJson.UpdateBool("attendees[i].self",1) loJson.UpdateBool("attendees[i].resource",1) loJson.UpdateBool("attendees[i].optional",1) loJson.UpdateString("attendees[i].responseStatus","string value") loJson.UpdateString("attendees[i].comment","string value") loJson.UpdateNumber("attendees[i].additionalGuests","1234") loJson.I = 1 loJson.UpdateString("attendees[i].id","string value") loJson.UpdateString("attendees[i].email","string value") loJson.UpdateString("attendees[i].displayName","string value") loJson.UpdateBool("attendees[1].organizer",1) loJson.UpdateBool("attendees[1].self",1) loJson.UpdateBool("attendees[1].resource",1) loJson.UpdateBool("attendees[1].optional",1) loJson.UpdateString("attendees[1].responseStatus","string value") loJson.UpdateString("attendees[1].comment","string value") loJson.UpdateNumber("attendees[1].additionalGuests","1234") loJson.UpdateBool("attendeesOmitted",1) loJson.UpdateString("extendedProperties.private.someKey","string value") loJson.UpdateString("extendedProperties.shared.someKey","string value") loJson.UpdateString("hangoutLink","string value") loJson.UpdateString("gadget.type","string value") loJson.UpdateString("gadget.title","string value") loJson.UpdateString("gadget.link","string value") loJson.UpdateString("gadget.iconLink","string value") loJson.UpdateNumber("gadget.width","1234") loJson.UpdateNumber("gadget.height","1234") loJson.UpdateString("gadget.display","string value") loJson.UpdateString("gadget.preferences.someKey","string value") loJson.UpdateBool("anyoneCanAddSelf",1) loJson.UpdateBool("guestsCanInviteOthers",1) loJson.UpdateBool("guestsCanModify",1) loJson.UpdateBool("guestsCanSeeOtherGuests",1) loJson.UpdateBool("privateCopy",1) loJson.UpdateBool("locked",1) loJson.UpdateBool("reminders.useDefault",1) loJson.UpdateString("reminders.overrides[0].method","string value") loJson.UpdateNumber("reminders.overrides[0].minutes","1234") loJson.UpdateString("source.url","string value") loJson.UpdateString("source.title","string value") loJson.UpdateString("attachments[0].fileUrl","string value") loJson.UpdateString("attachments[0].title","string value") loJson.UpdateString("attachments[0].mimeType","string value") loJson.UpdateString("attachments[0].iconLink","string value") loJson.UpdateString("attachments[0].fileId","string value") loJson.UpdateString("attachments[1].fileUrl","string value") loJson.UpdateString("attachments[1].title","string value") loJson.UpdateString("attachments[1].mimeType","string value") loJson.UpdateString("attachments[1].iconLink","string value") loJson.UpdateString("attachments[1].fileId","string value") loJson.EmitCompact = 0 ? loJson.Emit() RELEASE loJson |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.