Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

Visual Basic 6.0 Examples

Web API Categories

ASN.1
AWS KMS
AWS Misc
Amazon EC2
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Key Vault
Azure Service Bus
Azure Table Service
Base64
Bounced Email
Box
CAdES
CSR
CSV
Certificates
Cloud Signature CSC
Code Signing
Compression
DKIM / DomainKey
DNS
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
EBICS
ECC
Ed25519
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
GMail SMTP/IMAP/POP
Geolocation
Google APIs
Google Calendar
Google Cloud SQL
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text
HTTP

HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
MS Storage Providers
Microsoft Graph
Misc
NTLM
OAuth1
OAuth2
OIDC
Office365
OneDrive
OpenSSL
Outlook
Outlook Calendar
Outlook Contact
PDF Signatures
PEM
PFX/P12
PKCS11
POP3
PRNG
REST
REST Misc
RSA
SCP
SCard
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
ScMinidriver
Secrets
SharePoint
SharePoint Online
Signing in the Cloud
Socket/SSL/TLS
Spider
Stream
Tar Archive
ULID/UUID
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl
uncategorized

 

 

 

(Visual Basic 6.0) Google Calendar -- Generate Event JSON

See more Google Calendar Examples

Demonstrates 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.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

' 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"
'     }
'   ]
' }

Dim json As New ChilkatJsonObject
success = json.UpdateString("kind","calendar#event")
success = json.UpdateString("etag","some_etag")
success = json.UpdateString("id","string value")
success = json.UpdateString("status","string value")
success = json.UpdateString("htmlLink","string value")
success = json.UpdateString("created","datetime value")
success = json.UpdateString("updated","datetime value")
success = json.UpdateString("summary","string value")
success = json.UpdateString("description","string value")
success = json.UpdateString("location","string value")
success = json.UpdateString("colorId","string value")
success = json.UpdateString("creator.id","string value")
success = json.UpdateString("creator.email","string value")
success = json.UpdateString("creator.displayName","string value")
success = json.UpdateBool("creator.self",1)
success = json.UpdateString("organizer.id","string value")
success = json.UpdateString("organizer.email","string value")
success = json.UpdateString("organizer.displayName","string value")
success = json.UpdateBool("organizer.self",1)
success = json.UpdateString("start.date","date value")
success = json.UpdateString("start.dateTime","datetime value")
success = json.UpdateString("start.timeZone","string value")
success = json.UpdateString("end.date","date value")
success = json.UpdateString("end.dateTime","datetime value")
success = json.UpdateString("end.timeZone","string value")
success = json.UpdateBool("endTimeUnspecified",1)
success = json.UpdateString("recurrence[0]","string value")
success = json.UpdateString("recurringEventId","string value")
success = json.UpdateString("originalStartTime.date","date value")
success = json.UpdateString("originalStartTime.dateTime","datetime value")
success = json.UpdateString("originalStartTime.timeZone","string value")
success = json.UpdateString("transparency","string value")
success = json.UpdateString("visibility","string value")
success = json.UpdateString("iCalUID","string value")
success = json.UpdateNumber("sequence","1234")

success = json.UpdateString("attendees[0].id","string value")
success = json.UpdateString("attendees[0].email","string value")
success = json.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..
json.I = 0
success = json.UpdateBool("attendees[i].organizer",1)
success = json.UpdateBool("attendees[i].self",1)
success = json.UpdateBool("attendees[i].resource",1)
success = json.UpdateBool("attendees[i].optional",1)
success = json.UpdateString("attendees[i].responseStatus","string value")
success = json.UpdateString("attendees[i].comment","string value")
success = json.UpdateNumber("attendees[i].additionalGuests","1234")

json.I = 1
success = json.UpdateString("attendees[i].id","string value")
success = json.UpdateString("attendees[i].email","string value")
success = json.UpdateString("attendees[i].displayName","string value")

success = json.UpdateBool("attendees[1].organizer",1)
success = json.UpdateBool("attendees[1].self",1)
success = json.UpdateBool("attendees[1].resource",1)
success = json.UpdateBool("attendees[1].optional",1)
success = json.UpdateString("attendees[1].responseStatus","string value")
success = json.UpdateString("attendees[1].comment","string value")
success = json.UpdateNumber("attendees[1].additionalGuests","1234")

success = json.UpdateBool("attendeesOmitted",1)
success = json.UpdateString("extendedProperties.private.someKey","string value")
success = json.UpdateString("extendedProperties.shared.someKey","string value")
success = json.UpdateString("hangoutLink","string value")
success = json.UpdateString("gadget.type","string value")
success = json.UpdateString("gadget.title","string value")
success = json.UpdateString("gadget.link","string value")
success = json.UpdateString("gadget.iconLink","string value")
success = json.UpdateNumber("gadget.width","1234")
success = json.UpdateNumber("gadget.height","1234")
success = json.UpdateString("gadget.display","string value")
success = json.UpdateString("gadget.preferences.someKey","string value")
success = json.UpdateBool("anyoneCanAddSelf",1)
success = json.UpdateBool("guestsCanInviteOthers",1)
success = json.UpdateBool("guestsCanModify",1)
success = json.UpdateBool("guestsCanSeeOtherGuests",1)
success = json.UpdateBool("privateCopy",1)
success = json.UpdateBool("locked",1)
success = json.UpdateBool("reminders.useDefault",1)
success = json.UpdateString("reminders.overrides[0].method","string value")
success = json.UpdateNumber("reminders.overrides[0].minutes","1234")
success = json.UpdateString("source.url","string value")
success = json.UpdateString("source.title","string value")
success = json.UpdateString("attachments[0].fileUrl","string value")
success = json.UpdateString("attachments[0].title","string value")
success = json.UpdateString("attachments[0].mimeType","string value")
success = json.UpdateString("attachments[0].iconLink","string value")
success = json.UpdateString("attachments[0].fileId","string value")
success = json.UpdateString("attachments[1].fileUrl","string value")
success = json.UpdateString("attachments[1].title","string value")
success = json.UpdateString("attachments[1].mimeType","string value")
success = json.UpdateString("attachments[1].iconLink","string value")
success = json.UpdateString("attachments[1].fileId","string value")

json.EmitCompact = 0
Debug.Print json.Emit()

 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.