JSON data formats for iCalendar | N. Jenkins |
Internet-Draft | R. Stepanek |
Intended status: Standards Track | FastMail |
Expires: June 15, 2018 | December 12, 2017 |
JSCalendar: A JSON representation of calendar data
draft-jenkins-jscalendar-03
This specification defines a JSON representation of calendar data that can be used for storage and data exchange in a calendaring and scheduling environment. It aims to be an alternative to the widely deployed iCalendar data format and to be unambiguous, extendable and simple to process.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on June 15, 2018.
Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This document defines a JSON-based format to exchange event and task objects, or groups of such objects, in electronic calendar applications and systems. It uses a data model that aims to be unambiguous, extendable and simple to process.
The key design considerations for this format are as follows:
JSON is a text-based data interchange format as specified in [RFC7493]. The I-JSON format defined in [RFC7493] is a strict subset of this, adding restrictions to avoid potentially confusing scenarios (for example, it mandates that an object MUST NOT have two properties with the same key). Using JSON mostly is a pragmatic choice: its widespread use helps to speed up JSCalendar adoption and a wide range of production-ready JSON implementations allows to decrease interoperability issues.
The iCalendar data format [RFC5545], a widely deployed interchange format for calendaring and scheduling data, has served calendaring vendors for a long while, but contains some ambiguities and pitfalls that can not be overcome without backwards incompatible changes.
For example, iCalendar defines various formats for local times, UTC time and dates, which confuses new users. Other sources for errors are the requirement for custom timezone definitions within a single calendar component, as well as the iCalendar format itself; the latter causing interoperability issues due to misuse of CR LF terminated strings, line continuations and subtle differences between iCalendar parsers. Lastly, up until recently the iCalendar format did not allow to express the difference between two calendar components, which results in verbose exchanges during scheduling.
Some of these issues were addressed by the jCal format, which is a direct mapping between iCalendar and JSON. However, it did not attempt to extend or update iCalendar semantics.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
The underlying format used for this specification is JSON. Consequently, the terms "object" and "array" as well as the four primitive types (strings, numbers, booleans, and null) are to be interpreted as described in Section 1 of[RFC7159].
Some examples in this document contain "partial" JSON documents used for illustrative purposes. In these examples, three periods "..." are used to indicate a portion of the document that has been removed for compactness.
A JSCalendar object is a JSON object, which MUST be valid I-JSON (a stricter subset of JSON), as specified in [RFC7159]. Property names and values are case-sensitive.
The object has a collection of properties, as specified in the following sections. Unless otherwise specified, all properties are optional; omitted properties MUST be treated identically to if that property had the value of null, unless otherwise specified.
Types signatures are given for all JSON objects in this document. The following conventions are used:
In addition to the standard JSON data types, the following data types are used in this specification:
This is a string in [RFC3339] date-time format, with the further restrictions that any letters MUST be in upper-case, the time component MUST be included and the time MUST be in UTC. Fractional second values MUST NOT be included unless non-zero and MUST NOT have trailing zeros, to ensure there is only a single representation for each date-time.
For example 2010-10-10T10:10:10.003Z is OK, but 2010-10-10T10:10:10.000Z is invalid and MUST be encoded as 2010-10-10T10:10:10Z.
In common notation, it should be of the form YYYY-MM-DDTHH:MM:SSZ.
This is a date-time string with no time zone/offset information. It is otherwise in the same format as UTCDate: YYYY-MM-DDTHH:MM:SS. The time zone to associate the LocalDate with comes from an associated property, or if no time zone is associated it defines floating time. Floating date-times represents all such points in time that are represented on all time-lines with the same calendar day and clock time.
A duration is represented by a subset of ISO8601 duration format, as specified by the following ABNF:
dur-secfrac = "." 1*DIGIT dur-second = 1*DIGIT [dur-secfrac] "S" dur-minute = 1*DIGIT "M" [dur-second] dur-hour = 1*DIGIT "H" [dur-minute] dur-time = "T" (dur-hour / dur-minute / dur-second) dur-day = 1*DIGIT "D" duration = "P" (dur-day [dur-time] / dur-time)
In addition, the duration MUST NOT include fractional second values unless the fraction is non-zero. A zero duration MUST be represented as P0D.
A PatchObject is of type String[*|null], and represents an unordered set of patches on a JSON object. The keys are a path in a subset of [RFC6901] JSON pointer format, with an implicit leading / (i.e. prefix each key with / before applying the JSON pointer evaluation algorithm).
The pointer MUST NOT reference inside an array (i.e. you MUST NOT insert/delete from an array; the array MUST be replaced in its entirety instead). Any patch with a key that attempts to do this MUST be ignored.
When evaluating a path, all parts prior to the last (i.e. the value after the final slash) MUST exist for the patch to be valid. If not, the patch MUST be ignored.
There MUST NOT be two patches in the PatchObject where the pointer of one is the prefix of the pointer of the other, e.g. alerts/1/offset and alerts. The result in this case is undefined.
The value associated with each pointer is either:
JSCalendar aims at providing unambiguous definitions for value types and properties, but does not define a general normalisation or equivalence method for JSCalendar objects. This is because the notion of equivalence might range from byte-level equivalence to semantic equivalence, depending on the respective use case.
For example, the CalDAV protocol [RFC4791] requires octet equivalence of the encoded calendar object to determine ETag equivalence. In addition:
Considering this, the definition of equivalence and normalisation is left to client and server implementations and to be negotiated by a calendar exchange protocol or defined by another RFC.
Vendors MAY add additional properties to the calendar object to support their custom features. The names of these properties MUST be prefixed with a domain name controlled by the vendor to avoid conflict, e.g. fastmail.com/customprop.
Some JSCalendar properties allow vendor-specific value extensions. If so, vendor specific values MUST be prefixed with a domain name controlled by the vendor, e.g. fastmail.com/customrel, unless otherwise noted.
JSCalendar objects share a set of common properties, but might only support a subset of them. Refer to the respective object type definitions (Section 4) for which common properties they support.
Type: String
Specifies the type which this object represents. This MUST be one of the following values, registered in a future RFC, or a vendor-specific value:
A valid JSCalendar object MUST include this property.
Type: String
A globally unique identifier, used to associate the object as the same across different systems, calendars and views. Note that all JSCalendar objects share the same id space, so there MUST NOT be two JSCalendar objects of different type with the same uid. [RFC4122] describes a range of established algorithms to generate universally unique identifiers (UUID), and the random or pseudo-random version is recommended to use.
A valid JSCalendar object MUST include this property.
Type: String[Relation]|null
Relates the object to other JSCalendar objects. This is represented as a map of the uids of the related objects to information about the relation.
A Relation object has the following properties:
If an object is split to make a "this and future" change to a recurrence, the original object MUST be truncated to end at the previous occurrence before this split, and a new object created to represent all the objects after the split.
A relation=["next"] relatedTo property MUST be set on the original object with the uid of the new object. A relation=["first"] relatedTo property with the UID of the first object in the series MUST be set on the new object. Clients can then follow these UIDs to get the complete set of objects if the user wishes to modify them all at once.
Type: String|null
The identifier for the product that created the JSCalendar object.
The vendor of the implementation SHOULD ensure that this is a globally unique identifier, using some technique such as an FPI value, as defined in [ISO.9070.1991].
This property SHOULD NOT be used to alter the interpretation of an JSCalendar object beyond the semantics specified in this document. For example, it is not to be used to further the understanding of non-standard properties.
Type: UTCDate|null
The date and time this object was initially created.
Type: UTCDate
The date and time the data in this object was last modified.
Type: Number (Defaults to 0 if omitted)
Initially zero, this MUST be a non-negative integer that is monotonically incremented each time a change is made to the object.
Type: String|null
The iTIP ([RFC5546]) method, in lower-case. Used for scheduling.
Type: Recurrence
Defines a recurrence rule (repeating pattern) for recurring calendar objects.
A Recurrence object is a JSON object mapping of a RECUR value type in iCalendar, see [RFC5545] and[RFC7529]. Objects recur by applying the recurrence rule (and recurrenceOverrides) to the start date/time. A JSTask without a start recurs by its due date/time, if defined.
A Recurrence object has the following properties:
To convert from iCalendar, simply lower-case the FREQ part.
Type: LocalDate[PatchObject|null]|null
The object is a map of the Recurrence-Ids (i.e. the date-time of the start of the occurrence) to either null, to indicate the occurrence should be deleted, or an object of patches to apply to the generated occurrence object.
If the Recurrence-Id does not match an expanded start date from a recurrence rule, it is to be treated as an additional occurrence (like an RDATE from iCalendar). The patch object may often be empty in this case.
By default, an occurrence inherits all properties from the main object except the start (or due) date-time, which is shifted to the new start time. However, individual properties of the occurrence can be modified by a patch, or multiple patches.
A pointer in the PatchObject MUST NOT start with one of the following prefixes; any patch with such a key MUST be ignored:
Type: String (Defaults to the empty string if omitted)
A short summary of the object.
Type: String (Defaults to the empty string if omitted)
A longer form description of the object. This is plain text, but a client SHOULD attempt to hyperlink URLs when displaying it.
Type: String (Defaults to the empty string if omitted)
A longer form rich-text description of the object. This is HTML text and allows to reference resources in the links property by use of CID URLs (see [RFC2392]). To convert a CID URL to the cid property value of a Link object, implementations MUST follow the conversion described in section 2 of [RFC2392].
Type: String[Location]|null
A map of of location ids to Location objects, representing locations associated with the object. A location id may be any string and need only be unique to this object, although a UUID is a practical choice.
A Location object has the following properties. All properties are optional, but every Location object MUST have at least one property:
Type: String[Link]|null
A map of of link ids to Link objects, representing external resources associated with the object. A link id may be any string and need only be unique to this object, although the href or a UUID are practical choices.
A Link object has the following properties:
Type: String|null
The [RFC5646] language tag that best describes the locale used for the calendar object, if known.
Type: String[PatchObject]|null
A map of [RFC5646] language tags to patch objects, which localise the calendar object into the locale of the respective language tag.
See the description of PatchObject for the structure of the PatchObject. The patches are applied to the top-level object. In addition to all the restrictions on patches specified there, the pointer also MUST NOT start with one of the following prefixes; any patch with a such a key MUST be ignored:
Type: String[]|null
A list of keywords or tags related to the object. The values are free-form and do not have to follow any particular structure.
Type: String[]|null
Specifies the categories related to the calendar object. Array values MUST be URIs. In contrast to keywords, categories typically are structured.
For example, a vendor owning the domain example.com might define the categories http://example.com/categories/sports/american-football" and http://example.com/categories/music/r-b.
Type: String
Specifies a color clients MAY use when displaying this calendar object. The value is a case-insensitive color name taken from the CSS3 set of names, defined in Section 4.3 of W3C.REC-css3-color-20110607 or a CSS3 RGB color hex value. It is not intended that clients necessarily use the exact RGB value, but rather that they find a suitable color that works in the given UA context.
Type: Number(defaults to 0 if omitted)
Specifies a priority for the calendar object. This may be used as part of scheduling systems to help resolve conflicts for a time period.
The priority is specified as an integer in the range 0 to 9. A value of 0 specifies an undefined priority. A value of 1 is the highest priority. A value of 2 is the second highest priority. Subsequent numbers specify a decreasing ordinal priority. A value of 9 is the lowest priority. Other integer values are reserved for future use.
Type: String(defaults to busy if omitted)
Specifies how this property should be treated when calculating free-busy state. The value MUST be one of:
Type: String(defaults to public if omitted)
Calendar objects are normally collected together and may be shared with other users. The privacy property allows the object owner to indicate that it should not be shared, or should only have the time information shared but the details withheld.
As JSCalendar is simply a data model, enforcement of the restrictions indicated by this property are up to the implementations.
This property MUST NOT affect the information sent to scheduled participants; it is only interpreted when the object is shared as part of a shared calendar.
The value MUST be either one of the following values, registered in a future RFC, or a vendor-specific value. Vendor specific values MUST be prefixed with a domain name controlled by the vendor, e.g. fastmail.com/topsecret. Any value the client or server doesn't understand should be preserved but treated as equivalent to private.
In addition, any patches in
recurrenceOverrides whose key is prefixed with one of the above properties MUST be stripped.
Type: String[String]|null
Represents methods by which a participant may RSVP to the organizer of the calendar object. The keys in the property value are the available methods. The value is a URI to use that method. Future methods may be defined in future specifications; a calendar client MUST just ignore any method it does not understand.
The following methods are defined:
Type: String[Participant]|null
A map of participant ids to participants, describing their participation in the calendar object. A participant id may be any string and need only be unique to this calendar object; the email address of the participant is a good choice.
A Participant object has the following properties. Properties are mandatory unless marked otherwise:
Type: Boolean (defaults to false if omitted)
If true, use the user's default alerts for this calendar object and ignore the Section 3.5.2 property. Fetching user defaults is dependent on the API from which this JSCalendar object is being fetched, and is not defined in this specification.
Type: String[Alert]|null
A map of of alert ids to Alert objects, representing alerts/reminders to display or send the user for this calendar object. An alert id may be any string and need only be unique to this calendar object, although a globally unique id is a practical choice (also see Section 3.1.2)).
An Alert Object has the following properties:
MIME type: application/calendar+json;type=jsevent
A JSEvent represents a scheduled amount of time on a calendar, typically a meeting, appointment, reminder or anniversary. Multiple participants may partake in the event at multiple locations.
A JSEvent @type property value MUST be jsevent.
In addition to the common JSCalendar object properties a JSEvent has the following properties:
Type: LocalDate e.g. 2015-09-02T00:00:00
The date/time the event would start in the event's time zone.
A valid JSEvent MUST include this property.
Type: String|null
The IANA Time Zone Database name for the time zone the event is scheduled in, or null for floating time. If omitted, this MUST be presumed to be null (i.e. floating time).
Type: Duration, e.g. P2DT3H (Defaults to P0D if omitted)
The zero or positive duration of the event in absolute time (i.e. in UTC time; ignoring DST shifts). To get the end date in the event time zone, convert start into UTC, then add the duration, then convert the result into the appropriate time zone.
A JSEvent MAY be end in a different timezone (e.g. a plane flight crossing timezones). In this case, the JSEvent MUST specify the end timezone in a location property value that defines its rel to be end and the end timezone in its timeZone property.
Type: Boolean (optional, defaults to false)
Specifies if the event an all day event, such as a birthday or public holiday.
If isAllDay is true, then the following restrictions apply: timeZone property.
Note that all-day events MAY be bound to a specific time zone, as defined by the
Type: String
The scheduling status (Section 3.4) of a JSEvent defaults to confirmed if omitted.
If set, it MUST be one of:
MIME type: application/calendar+json;type=jstask
A JSTask represents an action-item, assignment, to-do or work item .
A JSTask @type property value MUST be jstask.
A JSTask may start and be due at certain points in time, may take some estimated time to complete and may recur; none of which is required. This notably differs from JSEvent which is required to start at a certain point in time and typically takes some non-zero duration to complete.
In addition to the common JSCalendar object properties a JSTask has the following properties:
Type: LocalDate|null e.g. 2015-09-02T00:00:00
The date/time the task is due in the task's time zone.
Type: LocalDate|null e.g. 2015-09-02T00:00:00
The date/time the task should start in the task's time zone.
Type: String|null
The IANA Time Zone Database name for the time zone the task is scheduled in, or null for floating time. If omitted, this MUST be presumed to be null (i.e. floating time).
Type: Duration|null, e.g. P2DT3H
Specifies the estimated positive duration of time the task takes to complete.
If the start and due properties are set, the estimated duration SHOULD be less than or equal to the time interval between these properties.
Type: UTCDate|null, e.g. 2016-06-13T12:00:00Z
Specifies the date/time the task was completed.
If the task is recurring and has future instances, a client may want to denote a specific task recurrence as completed but leave other instances as uncompleted. One way to achieve this is by overriding the completed property in the task recurrence overrides. However, this could produce a long list of completion times for regularly recurring tasks. An alternative approach is to split the JSTask into a current, single instance of JSTask with this instance completion time and a future recurring instance. Also see the definition of the relatedTo property Section 3.1.3 on splitting.
Type: Boolean (optional, defaults to false)
Specifies if the task is an all day task.
If isAllDay is true, then the following restrictions apply: timeZone property.
Note that all-day tasks MAY be bound to a specific time zone, as defined by the
In addition to the common properties of a Participant object (Section 3.4.5), a Participant within a JSTask supports the following property:
A ParticipantProgress object has the following properties:
Type: String
The scheduling status (Section 3.4) of a JSTask defaults to needs-action if omitted.
If set, it MUST be one of:
MIME type: application/calendar+json;type=jsgroup
A JSGroup is a collection of JSEvent and JSTask objects. Typically, objects are grouped by topic (e.g. by keywords) or calendar membership.
Its @type property value MUST be jsgroup.
JSGroup supports the following JSCalendar properties:
as well as the following JSGroup-specific properties:
Type: (JSTask|JSEvent)[]|null
A list of group members. The list MAY contain multiple object types and implementations MUST ignore entries of unknown type. The property value MUST either be null or the list MUST NOT be empty.
Type: String|null (optional, default is null)
The source from which updated versions of this group may be retrieved from. If the value is not null, it MUST be a URI.
This section specifies which JSCalendar properties can be mapped from and to iCalendar format. Implementations SHOULD follow these conversion guidelines. Still, JSCalendar does not restrict itself to iCalendar and conversion between these two formats MAY be lossy.
The iCalendar counterpart to JSEvent is the VEVENT component type [RFC5545]. A VEVENT component that is a direct child of a VCALENDAR component is equivalent to a standalone JSEvent. A VEVENT component within a VEVENT maps to the entries of the JSEvent recurrenceOverrides property (see Section 3.2.2).
Property | iCalendar counterpart |
---|---|
isAllDay | True, if the type of the DTSTART property in iCalendar is DATE. When translating from JSCalendar the iCalendar DTSTART property is of DATE value type, if the isAllDay property is set to true and the timeZone property is null. |
start | Corresponds to the DTSTART property in iCalendar. Note that time zone information is stored separately in JSEvent. |
timeZone | Corresponds to the TZID part of the DTSTART property in iCalendar. If the event has a different end time zone to start time zone, this should be added as a JSCalendar location with just a timeZone property and rel="end". |
duration | Corresponds to the DURATION or DSTART+DTEND properties in iCalendar. |
The iCalendar counterpart to JSTask is the VTODO component type [RFC5545]. A VTODO component that is a direct child of a VCALENDAR component is equivalent to a standalone JSTask. A VTODO component within a master VTODO maps to the entries of the JSTask recurrenceOverrides property (see Section 3.2.2).
Property | iCalendar counterpart |
---|---|
isAllDay | True, if the type of the DTSTART property in iCalendar is DATE. When translating from JSCalendar the iCalendar DTSTART property is of DATE value type, if the isAllDay property is set to true and the timeZone property is null. |
due | Corresponds to the DUE and DTSTART+DURATION properties in iCalendar. When mapping iCalendar VTODOs with DTSTART+DURATION, the due date is the result of adding DURATION to DTSTART in the DTSTART timezone. |
start | Corresponds to the DTSTART property in iCalendar. |
timeZone | Corresponds to the TZID part of the DTSTART/DUE properties in iCalendar. If the task has a different end time zone to start or due time zone, this should be added as a JSCalendar location with just a timeZone property and rel="end". |
estimatedDuration | Corresponds to the ESTIMATED-DURATION iCalendar property. NON-STANDARD: this property is currently non-standard, see [draft-apthorp-ical-tasks]. |
completed | Maps to the COMPLETED iCalendar property. |
progress | Corresponds to the PARTSTAT and COMPLETED properties in iCalendar. |
A JSGroup converts to a iCalendar VCALENDAR containing VEVENT or VTODO components.
Property | iCalendar counterpart |
---|---|
entries | The VEVENT and VTODO components within a top-level VCALENDAR component. |
source | Corresponds to the SOURCE property in iCalendar. |
Property | iCalendar counterpart |
---|---|
alerts | An Alert corresponds to the VALARM component in iCalendar, where the action is determined by the iCalendar ACTION property value (e.g., a DISPLAY property indicates that the JSCalendar Alert action is a DisplayAction and similarly an iCalendar EMAIL value for EmailAction action). The relativeTo and offset properties corresponds to the iCalendar TRIGGER property. NON-STANDARD: The iCalendar properties for JSCalendar Alert actions are non-standard, see [draft-daboo-valarm-extensions]. |
categories | Corresponds to the STRUCTURED-CATEGORY property in iCalendar, see. NON-STANDARD: this property is currently non-standard, see [draft-ietf-calext-ical-relations]. |
color | Corresponds to the COLOR property in iCalendar, as specified in [RFC7986]. |
created | Corresponds to the CREATED property in iCalendar. |
description | Corresponds to the DESCRIPTION property in iCalendar. |
htmlDescription | There is no direct equivalent in iCalendar. If the description is empty, implementations SHOUD store a plain text version of htmlDescription in iCalendar DESCRIPTION. |
freeBusyStatus | Corresponds to the TRANSP property in iCalendar. |
keywords | Corresponds to the CATEGORIES property in iCalendar, as specified in [RFC7986]. |
links | Corresponds to the ATTACH ([RFC5545]) and IMAGE iCalendar properties ([RFC7986]). |
locale | Corresponds to the LANGUAGE parameter in iCalendar, which is added to individual properties. When converting from iCalendar, one language must be picked as the main locale for the object, and all properties in other languages moved to the localizations JSEvent property. |
localizations | Corresponds to the LANGUAGE parameter in iCalendar, which is added to individual properties. When converting from iCalendar, one language must be picked as the main locale for the object, and all properties in other languages moved to the localizations JSEvent property. |
locations | See Section 5.5. |
method | Corresponds to the METHOD property in iCalendar. |
participants | See Section 5.5. |
priority | Corresponds to the PRIORITY property in iCalendar. |
privacy | Corresponds to the CLASS property in iCalendar. |
prodId | Corresponds to the PRODID property in iCalendar. |
recurrenceOverrides | Corresponds to the RDATE and EXDATE properties in iCalendar, plus VEVENT (for JSEvent) or VTODO (for JSTask) instances with a Recurrence-Id. |
recurrenceRule | Corresponds to the RRULE property in iCalendar. See the property definition at section Section 3.2.1 how to map a RRULE value. |
relatedTo | Corresponds to the RELATED-TO property in iCalendar. |
replyTo | A replyTo property of type imip corresponds to the email address of the ORGANIZER property in iCalendar. There is no iCalendar representation for the web type. |
sequence | Corresponds to the SEQUENCE property in iCalendar. |
status | Corresponds to the STATUS property in iCalendar (converted to lower-case). |
title | Corresponds to the SUMMARY property in iCalendar. |
uid | Corresponds to the UID property in iCalendar. |
updated | Corresponds to the DTSTAMP and LAST-MODIFIED properties in iCalendar. (These are only different in the iTIP case, and the difference is not actually useful.) |
Both JSCalendar participants and locations have counterparts in iCalendar but provide richer representation.
The following table outlines translation of JSCalendar participants. Where iCalendar has distinct properties for ORGANIZER and ATTENDEE, these are merged in JSCalendar into the Participant object type.
Property | iCalendar counterpart |
---|---|
name | the CN parameter |
kind | the CUTYPE parameter |
rsvpResponse | the PARTSTAT parameter |
role | the ORGANIZER and ATTENDEE properties. Owners map to the iCalendar ORGANIZER property, where mapping multiple owners to iCalendar is implementation-specific but MUST be consistent across mappings of the same object. |
participation | the ROLE parameter |
locationId | the JSCalendar identifier of a mapped CONFERENCE property that has the MODERATOR feature defined in its FEATURE parameter values. If multiple such CONFERENCE properties are defined in iCalendar, then the one with the most interactive features is chosen (VIDEO over AUDIO over CHAT over anything else). |
rsvpWanted | the RSVP parameter |
delegatedTo | the DELEGATED-TO parameter |
delegatedFrom | the DELEGATED-FROM parameter |
memberOf | the MEMBER parameter |
scheduleSequence | the SEQUENCE property of the participant's latest iMIP message |
scheduleUpdated | the DTSTAMP property of the participant's latest iMIP message |
For JSCalendar locations, the iCalendar counterparts are the [RFC5545] LOCATION and the extended iCalendar [RFC7986] CONFERENCE properties.
An iCalendar LOCATION property becomes a JSCalendar Location with just a description property. CONFERENCE property values in iCalendar map to locations with rel type virtual. The location feature property value corresponds to the extended iCalendar FEATURE property parameter values defined in [RFC7986]. Both iCalendar PHONE and AUDIO features map to the audio feature and the FEED parameter value is omitted. See the mapping for locationId in Table 5 on how to map CONFERENCE properties that contain the MODERATOR feature.
Both JSCalendar and iCalendar calendar objects may contain properties that are not expressible in the other format. This specification does not mandate how to preserve these properties. Instead, it leaves negotiation on how to treat unknown properties to client and server implementations and their protocol used to exchange calendar objects.
Two notable options to represent and preserve arbitrary iCalendar object properties in JSCalendar are:
The following examples illustrate several aspects of the JSCalendar data model and format.
This JSEvent object represents a one-time event taking place on September 28 at 4pm, UTC for one hour.
{ "@type": "jsevent", "uid": "2a358cee-6489-4f14-a57f-c104db4dc357", "updated": "2016-09-14T13:24:34Z", "title": "Squash", "description": "", "htmlDescription": "", "start": "2016-09-28T16:00:00", "timeZone": "Etc/UTC", "duration": "PT1H", "recurrenceRule": null, "recurrenceOverrides": null, "freeBusyStatus": "free", "replyTo": null, "participants": null, "alerts": null, "links": null, "locations": null, "locale": "en", "localizations": null, }
Since properties can be omitted if their default value is used, this can be simplified to:
{ "@type": "jsevent", "uid": "2a358cee-6489-4f14-a57f-c104db4dc357", "updated": "2016-09-14T13:24:34Z", "title": "Squash", "start": "2016-09-28T16:00:00", "timeZone": "Etc/UTC", "duration": "PT1H", "locale": "en" }
This JSEvent object represents a recurring event, taking place the first time on January 1, 2016 at 1pm in Vienna, Europe. It recurs monthly, but does not occur on February 1, 2016. In addition to the regular recurrences it also occurs on December 5, 2016 at 5pm, Vienna time. On May 1, it takes place at another location and lasts for two hours, in contrast to the regular one-hour duration.
{ "@type": "jsevent", "uid": "89eee195-600b-423b-b3a6-52b3a420e556", "title": "Tennis", "locations": { "loc1" : { "description" : "Joe's Tennis Plaza, Court #1" } }, "isAllDay": false, "start": "2016-01-01T13:00:00", "timeZone": "Europe/Vienna", "duration": "PT1H", "recurrenceRule": { "frequency": "monthly", }, "recurrenceOverrides": { "2016-02-01T13:00:00": null, "2016-05-01T13:00:00": { "duration": "PT2H", "locations": { "loc2": { "description": "Tennis Fritz&Mayer, Ltd." } }, "2016-12-05T17:00:00": {}, } } }
Note that the recurrenceOverride on May 1 overrides the complete location object. If the event should occur at both locations, the PatchObject would be defined as follows:
{ [...] "recurrenceOverrides": { [...] "2016-05-01T13:00:00": { "duration": "PT2H", "locations/loc2": { "description": "Tennis Fritz&Mayer, Ltd." } } }
The use of JSON as a format does have its own inherent security risks as discussed in Section 12 of [RFC7159]. Even though JSON is considered a safe subset of JavaScript, it should be kept in mind that a flaw in the parser processing JSON could still impose a threat, which doesn't arise with conventional iCalendar data.
With this in mind, a parser for JSON data aware of the security implications should be used for the format described in this document. For example, the use of JavaScript's eval() function is considered an unacceptable security risk, as described in Section 12 of[RFC7159]. A native parser with full awareness of the JSON format should be preferred.
This document amends the application/calendar MIME media type defined in [RFC7265].
New optional parameter: type with value being one of jsevent, jstask, jsgroup. The parameter MUST NOT occur more than once.
The authors would like to thank the members of CalConnect for their valuable contributions. This specification originated from the work of the API technical committee of CalConnect, the Calendaring and Scheduling Consortium.
[draft-apthorp-ical-tasks] | "Task Extensions to iCalendar" |
[draft-daboo-valarm-extensions] | "VALARM Extensions for iCalendar" |
[draft-ietf-calext-ical-relations] | "Support for iCalendar Relationships" |