JSON data formats for iCalendar N. Jenkins Internet-Draft R. Stepanek Intended status: Standards Track FastMail Expires: February 10, 2018 August 9, 2017 JSCalendar: A JSON representation of calendar data draft-jenkins-jscalendar-00 Abstract 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. Status of This Memo 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 http://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 February 10, 2018. Copyright Notice 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 (http://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. Jenkins & Stepanek Expires February 10, 2018 [Page 1] Internet-Draft JSEvent August 2017 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 5 2. Structure of JSCalendar objects . . . . . . . . . . . . . . . 5 2.1. Type signatures . . . . . . . . . . . . . . . . . . . . . 6 2.2. Data Types . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.1. UTCDate . . . . . . . . . . . . . . . . . . . . . . . 6 2.2.2. LocalDate . . . . . . . . . . . . . . . . . . . . . . 6 2.2.3. Duration . . . . . . . . . . . . . . . . . . . . . . 6 2.2.4. PatchObject . . . . . . . . . . . . . . . . . . . . . 7 2.3. Custom property extensions and values . . . . . . . . . . 7 3. JSCalendar properties . . . . . . . . . . . . . . . . . . . . 8 3.1. Metadata properties . . . . . . . . . . . . . . . . . . . 8 3.1.1. @type . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.2. uid . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.3. relatedTo . . . . . . . . . . . . . . . . . . . . . . 8 3.1.4. prodId . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.5. created . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.6. updated . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.7. sequence . . . . . . . . . . . . . . . . . . . . . . 10 3.1.8. method . . . . . . . . . . . . . . . . . . . . . . . 10 3.2. Time, duration and recurrence properties . . . . . . . . 10 3.2.1. recurrenceRule . . . . . . . . . . . . . . . . . . . 10 3.2.2. recurrenceOverrides . . . . . . . . . . . . . . . . . 12 3.3. What and where properties . . . . . . . . . . . . . . . . 13 3.3.1. title . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3.2. description . . . . . . . . . . . . . . . . . . . . . 13 3.3.3. locations . . . . . . . . . . . . . . . . . . . . . . 13 3.3.4. links . . . . . . . . . . . . . . . . . . . . . . . . 15 3.3.5. locale . . . . . . . . . . . . . . . . . . . . . . . 16 3.3.6. localizations . . . . . . . . . . . . . . . . . . . . 16 3.3.7. categories . . . . . . . . . . . . . . . . . . . . . 17 3.3.8. keywords . . . . . . . . . . . . . . . . . . . . . . 17 3.3.9. color . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4. Sharing and scheduling properties . . . . . . . . . . . . 17 3.4.1. status . . . . . . . . . . . . . . . . . . . . . . . 17 3.4.2. priority . . . . . . . . . . . . . . . . . . . . . . 18 3.4.3. freeBusyStatus . . . . . . . . . . . . . . . . . . . 18 3.4.4. privacy . . . . . . . . . . . . . . . . . . . . . . . 18 3.4.5. replyTo . . . . . . . . . . . . . . . . . . . . . . . 19 3.4.6. participants . . . . . . . . . . . . . . . . . . . . 20 3.5. Alerts properties . . . . . . . . . . . . . . . . . . . . 23 3.5.1. useDefaultAlerts . . . . . . . . . . . . . . . . . . 23 3.5.2. alerts . . . . . . . . . . . . . . . . . . . . . . . 23 4. JSCalendar objects . . . . . . . . . . . . . . . . . . . . . 25 4.1. JSEvent . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.1.1. start . . . . . . . . . . . . . . . . . . . . . . . . 25 Jenkins & Stepanek Expires February 10, 2018 [Page 2] Internet-Draft JSEvent August 2017 4.1.2. timeZone . . . . . . . . . . . . . . . . . . . . . . 25 4.1.3. duration . . . . . . . . . . . . . . . . . . . . . . 26 4.1.4. isAllDay . . . . . . . . . . . . . . . . . . . . . . 26 4.2. JSTask . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.2.1. due . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.2.2. start . . . . . . . . . . . . . . . . . . . . . . . . 27 4.2.3. timeZone . . . . . . . . . . . . . . . . . . . . . . 27 4.2.4. estimatedDuration . . . . . . . . . . . . . . . . . . 27 4.2.5. completed . . . . . . . . . . . . . . . . . . . . . . 27 4.2.6. isAllDay . . . . . . . . . . . . . . . . . . . . . . 28 4.3. JSGroup . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.3.1. entries . . . . . . . . . . . . . . . . . . . . . . . 29 4.3.2. source . . . . . . . . . . . . . . . . . . . . . . . 29 5. Conversion from and to iCalendar . . . . . . . . . . . . . . 29 5.1. JSEvent . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.1.1. isAllDay . . . . . . . . . . . . . . . . . . . . . . 29 5.1.2. start . . . . . . . . . . . . . . . . . . . . . . . . 29 5.1.3. timeZone . . . . . . . . . . . . . . . . . . . . . . 30 5.1.4. duration . . . . . . . . . . . . . . . . . . . . . . 30 5.2. JSTask . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.2.1. isAllDay . . . . . . . . . . . . . . . . . . . . . . 30 5.2.2. due . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.2.3. start . . . . . . . . . . . . . . . . . . . . . . . . 30 5.2.4. timeZone . . . . . . . . . . . . . . . . . . . . . . 30 5.2.5. estimatedDuration . . . . . . . . . . . . . . . . . . 31 5.2.6. completed . . . . . . . . . . . . . . . . . . . . . . 31 5.3. JSGroup . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.3.1. entries . . . . . . . . . . . . . . . . . . . . . . . 31 5.3.2. source . . . . . . . . . . . . . . . . . . . . . . . 31 5.4. Common properties . . . . . . . . . . . . . . . . . . . . 31 5.4.1. alerts . . . . . . . . . . . . . . . . . . . . . . . 31 5.4.2. categories . . . . . . . . . . . . . . . . . . . . . 31 5.4.3. created . . . . . . . . . . . . . . . . . . . . . . . 32 5.4.4. description . . . . . . . . . . . . . . . . . . . . . 32 5.4.5. freeBusyStatus . . . . . . . . . . . . . . . . . . . 32 5.4.6. keywords . . . . . . . . . . . . . . . . . . . . . . 32 5.4.7. links . . . . . . . . . . . . . . . . . . . . . . . . 32 5.4.8. locale . . . . . . . . . . . . . . . . . . . . . . . 32 5.4.9. localizations . . . . . . . . . . . . . . . . . . . . 32 5.4.10. locations . . . . . . . . . . . . . . . . . . . . . . 32 5.4.11. method . . . . . . . . . . . . . . . . . . . . . . . 33 5.4.12. participants . . . . . . . . . . . . . . . . . . . . 33 5.4.13. priority . . . . . . . . . . . . . . . . . . . . . . 33 5.4.14. privacy . . . . . . . . . . . . . . . . . . . . . . . 33 5.4.15. prodId . . . . . . . . . . . . . . . . . . . . . . . 33 5.4.16. recurrenceOverrides . . . . . . . . . . . . . . . . . 33 5.4.17. recurrenceRule . . . . . . . . . . . . . . . . . . . 34 5.4.18. relatedTo . . . . . . . . . . . . . . . . . . . . . . 34 Jenkins & Stepanek Expires February 10, 2018 [Page 3] Internet-Draft JSEvent August 2017 5.4.19. replyTo . . . . . . . . . . . . . . . . . . . . . . . 34 5.4.20. sequence . . . . . . . . . . . . . . . . . . . . . . 34 5.4.21. status . . . . . . . . . . . . . . . . . . . . . . . 34 5.4.22. title . . . . . . . . . . . . . . . . . . . . . . . . 34 5.4.23. uid . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.4.24. updated . . . . . . . . . . . . . . . . . . . . . . . 34 6. JSCalendar object examples . . . . . . . . . . . . . . . . . 34 6.1. Simple JSEvent . . . . . . . . . . . . . . . . . . . . . 34 6.2. Recurring JSEvent with exception . . . . . . . . . . . . 35 7. Security Considerations . . . . . . . . . . . . . . . . . . . 37 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 37 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 37 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 37 10.1. Normative References . . . . . . . . . . . . . . . . . . 37 10.2. Informative References . . . . . . . . . . . . . . . . . 39 10.3. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 39 1. Introduction 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 shows to confuse 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 [RFC7265] format, which is a direct mapping between iCalendar and JSON. However, it did not attempt to extend or update iCalendar semantics. This document defines a JSON-based format describing a single event or task object within a calendar, or a group of such objects, using a new data model that aims to be unambiguous, extendable and simple to process. The key design considerations for this format are as follows: Jenkins & Stepanek Expires February 10, 2018 [Page 4] Internet-Draft JSEvent August 2017 o The attributes of the calendar entry represented must be described as a simple key-value pair, reducing complexity of its representation. o The data format should avoid all ambiguities, making it difficult to make mistakes during implementation and increasing interoperability. o Most of the initial set of attributes should be taken from the iCalendar data format, but a conversion between the data formats is not guaranteed to be completed without losing semantic meaning. o Extensions, such as new properties and components, MUST NOT lead to requiring an update to this document. JSON is a text-based data interchange format as specified in[RFC7159]. 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 allows to decrease interoperability issues and helps to speed up adoption due to its widespread adoption. 1.1. Notational Conventions 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. 2. Structure of JSCalendar objects 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 Jenkins & Stepanek Expires February 10, 2018 [Page 5] Internet-Draft JSEvent August 2017 optional; omitted properties MUST be treated identically to if that property had the value of "null", unless otherwise specified. 2.1. Type signatures Types signatures are given for all JSON objects in this document. The following conventions are used: o "Boolean|String": The value is either a JSON "Boolean" value, or a JSON "String" value. o "Foo": Any name that is not a native JSON type means an object for which the properties (and their types) are defined elsewhere within this document. o "Foo[]": An array of objects of type "Foo". o "String[Foo]": A JSON "Object" being used as a map (associative array), where all the values are of type "Foo". 2.2. Data Types In addition to the standard JSON data types, the following data types are used in this specification: 2.2.1. UTCDate 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 (so, 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". 2.2.2. LocalDate 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. 2.2.3. Duration A duration is represented by a subset of ISO8601 duration format, as specified by the following ABNF: Jenkins & Stepanek Expires February 10, 2018 [Page 6] Internet-Draft JSEvent August 2017 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. 2.2.4. PatchObject 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: o "null": Remove the property from the patched object. If not present in the parent, this a no-op. o Anything else: The value to replace the inherited property on the patch object with (if present) or add to the property (if not present). 2.3. Custom property extensions and values Vendors MAY add additional properties to the calendar object to support their custom features. The names of these properties SHOULD be prefixed with a domain name controlled by the vendor to avoid conflict, e.g. "fastmail.com/customprop". Other systems that Jenkins & Stepanek Expires February 10, 2018 [Page 7] Internet-Draft JSEvent August 2017 interact with a JSCalendar object that contain properties they do not recognise SHOULD try to preserve them, but MUST otherwise ignore them. 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. 3. JSCalendar properties JSCalendar objects share a set of properties, but not all JSCalendar support the same properties. Refer to the respective object type definitions (Section 4) which common properties they support. 3.1. Metadata properties 3.1.1. @type Type: "String" Specifies the type which this object represents. A valid JSCalendar object MUST include this property. 3.1.2. uid 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. A valid JSCalendar object MUST include this property. 3.1.3. relatedTo Type: "String[Relation]|null" Relates the object to other objects of the same type. This is represented as a map of the uid of the related object to information about the relation. A *Relation* object has the following properties: o *relation*: "String[]" Describes how the linked object is related to this object. Jenkins & Stepanek Expires February 10, 2018 [Page 8] Internet-Draft JSEvent August 2017 The strings in the array MUST each be at most one of the following values, registered in a future RFC, or a vendor-specific value: * "first": The linked object is the first in the series this object is part of. * "next": The linked object is the next in the series this object is part of. * "child": The linked object is a subpart of this object. * "parent": This object is part of the overall linked object. If an object is split to make a "this and future" change to a recurrence, the original object should 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 SHOULD 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 SHOULD 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. 3.1.4. prodId 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. 3.1.5. created Type: "UTCDate|null" The date and time this object was initially created. Jenkins & Stepanek Expires February 10, 2018 [Page 9] Internet-Draft JSEvent August 2017 3.1.6. updated Type: "UTCDate" The date and time the data in this object was last modified. 3.1.7. sequence Type: "Number" (Defaults to "0" if omitted) Initially zero, this is monotonically incremented each time a significant change is made to the object. 3.1.8. method Type: "String|null" The iTIP ([RFC5546]) method, in lower-case. Used for scheduling. 3.2. Time, duration and recurrence properties 3.2.1. recurrenceRule 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 (Section 4.2) without a *start* recurs by its *due* date/time, if defined. A Recurrence object has the following properties: o *frequency*: "String" This MUST be one of the following values: * "yearly" * "monthly" * "weekly" * "daily" * "hourly" Jenkins & Stepanek Expires February 10, 2018 [Page 10] Internet-Draft JSEvent August 2017 * "minutely" * "secondly" To convert from iCalendar, simply lower-case the FREQ part. o *interval*: "Number"(optional, defaults to "1") The INTERVAL part from iCal. If included, it MUST be an integer "x >= 1". o *rscale*: "String"(optional, defaults to ""gregorian"") The RSCALE part from iCalendar RSCALE [RFC7529], converted to lower-case. o *skip*: "String"(optional, defaults to ""omit"") The SKIP part from iCalendar RSCALE [RFC7529], converted to lower-case. o *firstDayOfWeek*: "String"(optional, defaults to ""mo"") The WKST part from iCalendar, represented as a lower-case abbreviated two- letter English day of the week. If included, it MUST be one of the following values: ""mo"|"tu"|"we"|"th"|"fr"|"sa"|"su"". o *byDay*: "NDay[]"(optional) An *NDay* object has the following properties: * *day*: "String" The day-of-the-week part of the BYDAY value in iCalendar, lower-cased. MUST be one of the following values: ""mo"|"tu"|"we"|"th"|"fr"|"sa"|"su"". * *nthOfPeriod*: "Number"(optional) If present, rather than representing every Friday (for example), it represents only a specific instance within the period (month for monthly recurrences, year for yearly recurrences). Must be a non-zero integer, negative integers means nth-last of period. This is the ""+1"" or ""-3" " etc. prefix from the BYDAY values in iCal. o *byDate*: "Number[]"(optional) The BYMONTHDAY part from iCalendar. The array MUST have at least one entry if included. o *byMonth*: "String[]"(optional) The BYMONTH part from iCalendar. Each entry is a string representation of a number, starting from "1" for the first month in the calendar (e.g. ""1" " means ""January"" with Gregorian calendar), with an optional ""L"" suffix (see [RFC7529]) for leap months (this MUST be upper-case, e.g. ""3L""). The array MUST have at least one entry if included. o *byYearDay*: "Number[]"(optional) The BYYEARDAY part from iCalendar. The array MUST have at least one entry if included. Jenkins & Stepanek Expires February 10, 2018 [Page 11] Internet-Draft JSEvent August 2017 o *byWeekNo*: "Number[]"(optional) The BYWEEKNO part from iCalendar. The array MUST have at least one entry if included. o *byHour*: "Number[]"(optional) The BYHOUR part from iCalendar. The array MUST have at least one entry if included. o *byMinute*: "Number[]"(optional) The BYMINUTE part from iCalendar. The array MUST have at least one entry if included. o *bySecond*: "Number[]"(optional) The BYSECOND part from iCalendar. The array MUST have at least one entry if included. o *count*: "Number"(optional) The COUNT part from iCalendar. This MUST NOT be included if an *until* property is specified. o *until*: "LocalDate"(optional) The UNTIL part from iCalendar. This MUST NOT be included if a *count* property is specified. Note, as in iCalendar, this date is presumed to be in the timezone specified in *timeZone*. It is not a UTC time. 3.2.2. recurrenceOverrides Type: "LocalDate[PatchObject|null]|null" The object is a map of the Recurrence-Id (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 event 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: o uid o relatedTo o prodId Jenkins & Stepanek Expires February 10, 2018 [Page 12] Internet-Draft JSEvent August 2017 o method o isAllDay o recurrenceRule o recurrenceOverrides o replyTo 3.3. What and where properties 3.3.1. title Type: "String" (Defaults to the empty string if omitted) A short summary of the object. 3.3.2. description 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. 3.3.3. locations Type: "String[Location]|null" A map of of location id 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: o *name*: "String" The human-readable name of the location. o *description*: "String" Human-readable instructions for accessing this location. This may be an address, set of directions, door access code, etc. o *rel*: "String" The relation type of this location to the JSCalendar object. This MUST be either one of the following values, registered in a future RFC, or a vendor-specific value. Any value the client or server doesn't understand should be treated the same as "unknown". Jenkins & Stepanek Expires February 10, 2018 [Page 13] Internet-Draft JSEvent August 2017 * "start": The JSCalendar object starts at this location. * "end": The JSCalendar object ends at this location. * "virtual": This is not a physical location (e.g. this location is an online chat room where people will meet). * "unknown": The relation of this location to the event is unknown. o *features*: "String[]|null" The features supported by this location. The strings in the array MUST each be either one of the following values, registered in a future RFC, or a vendor-specific value. Any value the client or server doesn't understand should be ignored, but preserved. The features supported by locations with rel-type "virtual" are: * "audio": audio capability * "chat": chat or instant messaging * "feed": a blog or Atom feed * "moderator": moderator-specific * "phone": phone conference * "screen": screen sharing * "video": video conferencing * any vendor-prefixed custom value o *timeZone*: "String" A time zone for this location. If omitted, the start time zone MUST be used for this location. o *coordinates*: "String" An [RFC5870] "geo:" URI for the location. o *uri*: "String" A URI that represents how to connect from this location. This may be a telephone number (represented as "tel:+1-555-555-555") for a teleconference, a web address for Jenkins & Stepanek Expires February 10, 2018 [Page 14] Internet-Draft JSEvent August 2017 online chat, or a custom URI for something like Skype (e.g. "skype:username"). o *linkIds*: "String[]|null" Links to alternate representations of this location. For example, an alternative representation could be in vCard format. If a given value does not correspond to any link id in the links property of the instance, this MUST be ignored. 3.3.4. links Type: "String[Link]|null" A map of of link id 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: o *href*: "String" A URI from which the resource may be fetched. This MAY be a "data:" URL, but it is recommended that the file be hosted on a server. o *type*: "String|null"(optional, defaults to "null") The content- type of the resource, if known. o *size*: "Number|null"(optional, defaults to "null") The size, in bytes, of the resource when fully decoded (i.e. the number of bytes in the file the user would download), if known. o *rel*: "String"(optional, defaults to "related") Identifies the relation of the linked resource to the object. The value MUST be a registered relation type (see[RFC5988]). The features supported by locations with rel-type "virtual" are: Links with a rel of "enclosure" SHOULD be considered by the client as attachments for download. Links with a rel of "describedby" SHOULD be considered by the client to be an alternate representation of the description, for example an HTML page describing the object. Links with a rel of "icon" SHOULD be considered by the client to be an image that it MAY use when presenting the calendar data to a Jenkins & Stepanek Expires February 10, 2018 [Page 15] Internet-Draft JSEvent August 2017 user. The properties object of this link MAY include a display property indicating the intended purpose of this image. If included, the value MUST be either one of the following values, registered in a future RFC, or a vendor-specific value. * "badge": an image inline with the title of the object * "graphic": a full image replacement for the object itself * "fullsize": an image that is used to enhance the object * "thumbnail": a smaller variant of "fullsize " to be used when space for the image is constrained o *title*: "String|null"(optional, defaults to "null") A human- readable description of the resource. o *properties*: "String[String|null]|null"(optional, defaults to "null") Extra metadata stored by a client about a link. The keys are as defined in this document, as defined in a future RFC, or URIs that should be owned by the client author to avoid conflicts. 3.3.5. locale Type: "String|null" The [RFC5646] language tag that best describes the locale used for the event, if known. 3.3.6. localizations Type: "String[PatchObject]|null" A map of [RFC5646] language tag to a patch object which localises the event into that locale. See the description of PatchObject (Section 2.2.4) 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: o sequence o localization Jenkins & Stepanek Expires February 10, 2018 [Page 16] Internet-Draft JSEvent August 2017 o start o timeZone o duration o status o freeBusyStatus o participants o useDefaultAlerts 3.3.7. categories Type: "String[]|null" Specifies the categories related to the calendar object. Array values MUST be URIs. 3.3.8. keywords Type: "String[]|null" A list of keywords or tags related to the object. The values are freeform and do not have to follow any particular structure. 3.3.9. color Type: "String" Specifies a color clients MAY use when displaying this event. 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 [1]. It is not intended that clients necessarily use the exact RGB value associated with this color name, but rather that they use the name to find a suitable color that works in the given UA context. 3.4. Sharing and scheduling properties 3.4.1. status Type: "String"(defaults to ""confirmed"" if omitted) The status of the object. MUST be one of: o "confirmed": Indicates the calendar object is definite. Jenkins & Stepanek Expires February 10, 2018 [Page 17] Internet-Draft JSEvent August 2017 o "cancelled": Indicates the calendar object was cancelled. o "tentative": Indicates the calendar object is tentative. 3.4.2. priority Type: "Number"(defaults to "0" if omitted) Specifies a priority for the event. 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. 3.4.3. freeBusyStatus 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: o ""free"": The object should be ignored when calculating whether the user is busy. o ""busy"": The object should be included when calculating whether the user is busy. 3.4.4. privacy 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 Jenkins & Stepanek Expires February 10, 2018 [Page 18] Internet-Draft JSEvent August 2017 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". o "public": The full details of the object are visible to those whom the object's calendar is shared with. o "private": The details of the object are hidden; only the basic time and metadata is shared. Implementations SHOULD ensure the following properties are stripped when the object is accessed by a sharee: * title * description * locations * links * locale * localizations * participants * replyTo In addition, any patches in "recurrenceOverrides" whose key is prefixed with one of the above properties SHOULD be stripped. o "secret": The object is hidden completely (as though it did not exist) when the calendar is shared. 3.4.5. replyTo 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 specications; a calendar client MUST just ignore any method it does not understand. The following methods are defined: Jenkins & Stepanek Expires February 10, 2018 [Page 19] Internet-Draft JSEvent August 2017 o "imip": The organizer accepts an iMIP [RFC6047] response. The value MUST be a "mailto:" URI. o "web": There is a web page where the user may submit an RSVP using their browser. The value MUST be an "http:" or "https: " URI. 3.4.6. participants Type: "String[Participant]|null" A map of participant id to a participant describing their participation in the calendar object. A participant id may be any string and need only be unique to this event; the email address of the participant is a good choice. A *Participant* object has the following properties. Properties are mandatory unless marked otherwise: o *name*: "String" The display name of the participant (e.g. "Joe Bloggs"). o *email*: "String" The email address for the participant. o *kind*: "String"(optional, defaults to "unknown") What kind of entity this participant is. This MUST be either one of the following values, registered in a future RFC, or a vendor-specific value. Any value the client or server doesn't understand should be treated the same as "unknown". * "individual": a single person * "group": a collection of people invited as a whole * "resource": a non-human resource, e.g. a projector * "location": a physical location involved in the event that needs to be scheduled, e.g. a conference room. * "unknown": no information is available about the kind of this participant. o *roles*: "String[]" A list of roles that this participant fulfils. At least one value MUST be specified for the participant. This MUST be either one of the following values, registered in a future RFC, or a vendor-specific value. Any value the client or server doesn't understand should be preserved but ignored. Jenkins & Stepanek Expires February 10, 2018 [Page 20] Internet-Draft JSEvent August 2017 * "owner": The participant is an organizer of the event, and allowed to make alterations to any part of the event. * "attendee": The participant is an attendee of the event. * "chair": The participant is in charge of the event when it occurs. o *locationId|null*: "String"(optional, defaults to "null") The location at which this participant is expected to be attending. If the value does not correspond to any location id in the locations property of the instance, this MUST be treated the same as if the participant's locationId were specified as null. o *rsvpResponse*: "String"(optional, defaults to "needs-action") The RSVP response, if any, of this participant. The value MUST be either one of the following values, registered in a future RFC, or a vendor-specific value: * "needs-action": No status yet set by the participant. * "accepted": The participant will attend. * "declined": The participant may attend. * "tentative": The participant will not attend. o *participation*: "String"(optional, defaults to "required") The required attendance of this participant. The value MUST be either one of the following values, registered in a future RFC, or a vendor-specific value. Any value the client or server doesn't understand should be treated the same as "required". * "non-participant": Indicates a participant who is copied for information purposes only. * "optional": Indicates a participant whose participation is optional. * "required": Indicates a participant whose participation is required. Jenkins & Stepanek Expires February 10, 2018 [Page 21] Internet-Draft JSEvent August 2017 o *rsvpWanted*: "Boolean"(optional, defaults to "false") If true, the organizer is expecting the participant to notify them of their status. o *scheduleSequence*: "Number"(optional, defaults to "0") The sequence number of the last response from the participant. This can be used to determine whether the partcipant has sent a new RSVP following significant changes to the event, and to determine if future responses are responding to a current or older view of the data. o *scheduleUpdated*: "UTCDate|null"(optional, defaults to "null") The *updated* property of the last iMIP response from the participant. This can be compared to the *updated* timestamp in future iMIP responses to determine if the response is older or newer than the current data. o *invitedBy*: "String|null"(optional, defaults to "null") The participant id of the participant who invited this one, if known. o *delegatedTo*: "String[]|null"(optional, defaults to "null") A list of participant ids of participants that this participant has delegated their participation to. This MUST be omitted if none (rather than an empty array). o *delegatedFrom*: "String[]|null"(optional, defaults to "null") A list of participant ids that this participant is acting as a delegate for. This MUST be omitted if none (rather than an empty array). o *memberOf*: "String[]|null"(optional, defaults to "null") A list of group addresses that were invited to this calendar object, which caused this participant to be invited due to their membership of the group(s). This MUST be omitted if none (rather than an empty array). o *linkIds*: "String[]|null"(optional, defaults to "null") Links to more information about this participant, for example in vCard format. If a given value does not correspond to any link id in the links property of the instance, this id MUST be ignored. This MUST be omitted if none (rather than an empty array). Jenkins & Stepanek Expires February 10, 2018 [Page 22] Internet-Draft JSEvent August 2017 3.5. Alerts properties 3.5.1. useDefaultAlerts Type: "Boolean" (defaults to "false" if omitted) If "true", use the user's default alerts for this event 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. 3.5.2. alerts Type: "String[Alert]|null" A map of of alert id 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 UUID is a practical choice. An *Alert* Object has the following properties: o *relativeTo*: "String" (optional, defaults to "before-start") Specifies where the offset is relative to for the alarm to trigger. The value MUST be one of: * "before-start" * "after-start" * "before-end" * "after-end" o *offset*: "Duration" The offset from the start and end/due of the calendar object to fire the alert. Note, if the calendar object is in floating time (including all-day events), the server SHOULD use the user's default time zone when determining the offset. o *action*: "DisplayAction|EmailAction|UnknownAction" Describes how to alert the user. A *DisplayAction* means a message (which is service dependent, but SHOULD include the summary and start or due time of the calendar object) SHOULD be shown to the user on any client connected to this account at the specified time. How this message is formatted Jenkins & Stepanek Expires February 10, 2018 [Page 23] Internet-Draft JSEvent August 2017 (and any sound or other method of drawing the user's attention) is client specific. It has the following properties: * *type*: "String" The value MUST be "display". * *acknowledged*: "UTCDate|null " (optional) When the user has permanently dismissed the alert the client SHOULD set this to the current time in UTC. Other clients which sync this property can then automatically dismiss or suppress duplicate alerts (alerts with the same alert id that triggered on or before this date-time). For a recurring event, the *acknowledged* property of the parent event SHOULD be updated, unless the alert is already overridden in *recurrenceOverrides*. * *snoozed*: "UTCDate|null" (optional) If the user temporarily dismisses the alert, this is the UTC date-time after which it should be reshown Clients displaying this alert SHOULD hide it if the snoozed property is updated to a time in the future. When that time is reached, the alert SHOULD be reshown unless acknowledged is now after the original trigger time. * *audioLinkId*: "String|null " (optional) The id of a link in the Section 3.3.4 property. If the linked file is of an audio type understood by the client, the client SHOULD play this audio when triggering the alert. An *EmailAction* means the server MUST send an email as specified in the object at the specified time. It has the following properties: * *type*: "String" The value MUST be "email". * *to*: "Emailer[]" An array of name/email objects to send the alert to. An *Emailer* object has the following properties: + name: String The name of the recipient. If not known, clients SHOULD use the empty string. + email: String The email address of the recipient. Jenkins & Stepanek Expires February 10, 2018 [Page 24] Internet-Draft JSEvent August 2017 * *subject*: "String" (optional) The subject to use for the email. If omitted, this is implementation specific, but the server SHOULD try to choose an appropriate subject (such as "Event Summary: starting in 5 min"). * *textBody*: "String" (optional) The plain-text body to use for the email. If omitted, the body of the email is implementation specific, but the server SHOULD include all pertinent details about the event, such as summary, location and start time. An *UnknownAction* object is an object that contains a _type _ property whose value is not "email" or "string", plus zero or more other properties. This is for compatibility with client extensions and future RFCs. The client or server SHOULD NOT trigger any type of alert for action types they do not understand, but MUST preserve them. 4. JSCalendar objects 4.1. JSEvent MIME type: "application/json+cal;type=event" 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 (Section 3.1.1) property value MUST be "event". In addition to the common JSCalendar object properties (Section 3) a JSEvent has the following properties: 4.1.1. start 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. 4.1.2. timeZone Type: "String|null" The IANA Time Zone Database [2] 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). Jenkins & Stepanek Expires February 10, 2018 [Page 25] Internet-Draft JSEvent August 2017 4.1.3. duration 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 SHOULD specify the end timezone in a *location* property value that defines its *rel* to be "end" and the end timezone in its *timeZone* property. 4.1.4. isAllDay 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: o the *start* property MUST have a time component of "T00:00:00". o the *timeZone* property MUST be null (or omitted). o the *duration* property MUST only include a day component. 4.2. JSTask MIME type: "application/json+cal;type=task" A JSTask represents an action-item, assignment, to-do or work item . A JSTask @type (Section 3.1.1) property value MUST be "task". 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 (Section 4.1) 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 (Section 3) as JSTask has the following properties: Jenkins & Stepanek Expires February 10, 2018 [Page 26] Internet-Draft JSEvent August 2017 4.2.1. due Type: "LocalDate|null" e.g. "2015-09-02T00:00:00" The date/time the task is due in the task's time zone. 4.2.2. start Type: "LocalDate|null" e.g. "2015-09-02T00:00:00" The date/time the task should start in the task's time zone. If the *due* property is set, the *start* property value MUST be earlier than or at the due date/time. 4.2.3. timeZone 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). 4.2.4. estimatedDuration 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. 4.2.5. completed 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 (Section 3.2.2). 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 Jenkins & Stepanek Expires February 10, 2018 [Page 27] Internet-Draft JSEvent August 2017 instance. Also see the definition of the relatedTo (Section 3.1.3) property Section 3.1.3 on splitting. 4.2.6. isAllDay Type: "Boolean" (optional, defaults to "false") Specifies if the task is an all day task. If *isAllDay* is true, then the following restrictions apply: o the *start* and *due* properties MUST have a time component of "T00:00:00". o the *timeZone* property MUST be null (or omitted). o the *duration* and *estimatedDuration* properties MUST only include a day component. 4.3. JSGroup MIME type: "application/json+cal;type=group" A JSGroup is a collection of JSEvent (Section 4.1) and JSTask (Section 4.2) objects. Typically, objects are grouped by topic (e.g. by keywords) or calendar membership. Its @type (Section 3.1.1) property value MUST be "group". JSGroup supports the following JSCalendar properties (Section 3): o @type o uid o updated o categories o keywords o name o description o color o links Jenkins & Stepanek Expires February 10, 2018 [Page 28] Internet-Draft JSEvent August 2017 as well as the following JSGroup-specific properties: 4.3.1. entries 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. 4.3.2. source 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 an URI. 5. Conversion from and to iCalendar 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 the expressivity of iCalendar and conversion between these two formats MAY be lossy. Implementations that serve the same calendar entry in both JSCalendar and iCalendar SHOULD preserve properties that can not be converted (e.g., a JSCalendar property that can't be translated to iCalendar MAY be omitted in the iCalendar representation but MUST be preserved in the JSCalendar format). 5.1. JSEvent 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). 5.1.1. isAllDay Corresponds to the type (DATE or DATE-TIME) of the DTSTART property in iCalendar. 5.1.2. start Corresponds to the DTSTART property in iCalendar. Note that time zone information is stored separately in JSEvent. Jenkins & Stepanek Expires February 10, 2018 [Page 29] Internet-Draft JSEvent August 2017 5.1.3. 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"". 5.1.4. duration Corresponds to the DURATION or DSTART+DTEND properties in iCalendar. 5.2. JSTask 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). 5.2.1. isAllDay Corresponds to the type (DATE or DATE-TIME) of the DTSTART and DUE properties in iCalendar. 5.2.2. 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. 5.2.3. start Corresponds to the DTSTART property in iCalendar. 5.2.4. 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"". Jenkins & Stepanek Expires February 10, 2018 [Page 30] Internet-Draft JSEvent August 2017 5.2.5. estimatedDuration Corresponds to the ESTIMATED-DURATION iCalendar property. *NON- STANDARD*: this property is currently non-standard, see [draft-apthorp-ical-tasks]. 5.2.6. completed Maps to the COMPLETED iCalendar property. 5.3. JSGroup A JSGroup converts to a iCalendar VCALENDAR containing VEVENT or VTODO components. 5.3.1. entries The VEVENT and VTODO components within a top-level VCALENDAR component. 5.3.2. source Corresponds to the SOURCE property in iCalendar. 5.4. Common properties 5.4.1. 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]. 5.4.2. categories Corresponds to the STRUCTURED-CATEGORY property in iCalendar, see. *NON-STANDARD*: this property is currently non-standard, see [draft-ietf-calext-ical-relations]. Jenkins & Stepanek Expires February 10, 2018 [Page 31] Internet-Draft JSEvent August 2017 5.4.3. created Corresponds to the CREATED property in iCalendar. 5.4.4. description Corresponds to the DESCRIPTION property in iCalendar. 5.4.5. freeBusyStatus Corresponds to the TRANSP property in iCalendar. 5.4.6. keywords Corresponds to the COLOR property in iCalendar, as specified in [RFC7986]. 5.4.7. links Corresponds to the ATTACH ([RFC5545]) and IMAGE iCalendar properties ([RFC7986]). 5.4.8. 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. 5.4.9. 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. 5.4.10. locations Corresponds to the LOCATION and CONFERENCE [RFC7986] properties in iCalendar. For LOCATION, the JSCalendar representation is much richer than is supported by iCalendar. When converting from iCalendar, the LOCATION property should become a single location with just a description property. CONFERENCE property values in iCalendar map to locations with rel type "virtual". A location *feature* property value corresponds to the FEATURE property parameter values defined in [RFC7986]. Jenkins & Stepanek Expires February 10, 2018 [Page 32] Internet-Draft JSEvent August 2017 5.4.11. method Corresponds to the METHOD property in iCalendar. 5.4.12. participants Corresponds to the ORGANIZER and ATTENDEES properties from iCalendar. The following Participant object fields map to iCalendar parameters on the ORGANIZER and ATTENDEE properties: o *name*: the CN parameter o *kind*: the CUTYPE parameter o *rsvpResponse*: the PARTSTAT parameter o *participation*: the ROLE parameter o *rsvpWanted*: the RSVP parameter o *delegatedTo*: the DELEGATED-TO parameter o *delegatedFrom*: the DELEGATED-FROM parameter o *memberOf*: the MEMBER parameter The *scheduleSequence* and *scheduleUpdated * properties correspond to the iCalendar SEQUENCE and DTSTAMP property values for the participant's latest iMIP message. 5.4.13. priority Corresponds to the PRIORITY property in iCalendar. 5.4.14. privacy Corresponds to the CLASS property in iCalendar. 5.4.15. prodId Corresponds to the PRODID property in iCalendar. 5.4.16. recurrenceOverrides Corresponds to the RDATE and EXDATE properties in iCalendar, plus VEVENT (for JSEvent) or VTODO (for JSTask) instances with a Recurrence-Id. Jenkins & Stepanek Expires February 10, 2018 [Page 33] Internet-Draft JSEvent August 2017 5.4.17. recurrenceRule Corresponds to the RRULE property in iCalendar. See the property definition at section Section 3.2.1 how to map a RRULE value. 5.4.18. relatedTo Corresponds to the RELATED-TO property in iCalendar. 5.4.19. 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. 5.4.20. sequence Corresponds to the SEQUENCE property in iCalendar. 5.4.21. status Corresponds to the STATUS property in iCalendar (converted to lower- case). 5.4.22. title Corresponds to the SUMMARY property in iCalendar. 5.4.23. uid Corresponds to the UID property in iCalendar. 5.4.24. 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.) 6. JSCalendar object examples The following examples illustrate several aspects of the JSCalendar data model and foramt. 6.1. Simple JSEvent This JSEvent object represents a one-time event taking place on September 28 at 4pm, GMT for one hour. Jenkins & Stepanek Expires February 10, 2018 [Page 34] Internet-Draft JSEvent August 2017 { "@type": "event", "uid": "2a358cee-6489-4f14-a57f-c104db4dc357", "updated": "2016-09-14T13:24:34Z", "title": "Squash", "description": "", "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, } 6.2. Recurring JSEvent with exception This JSEvent object represents a recurring event, taking place the first time on January 1, 2016 at 1pm. It recurs monthly, but does not occur on February 2, 2016. In addition to the regular recurrences it also occurs on December 5, 2016 at 5pm. On May 1, it takes place at another location. Jenkins & Stepanek Expires February 10, 2018 [Page 35] Internet-Draft JSEvent August 2017 { "@type": "event", "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", "rscale": "gregorian" }, "recurrenceOverrides": { "2016-12-05T17:00:00": {}, "2016-02-01T13:00:00": null, "2016-05-01T13:00:00": { "duration": "PT2H", "locations": { "loc2": { "description": "Tennis Fritz&Mayer, Ltd." } } } } } 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." } } } Jenkins & Stepanek Expires February 10, 2018 [Page 36] Internet-Draft JSEvent August 2017 7. Security Considerations 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. 8. IANA Considerations This document defines a MIME media type for use with iCalendar in JSON data. This media type SHOULD be used for the transfer of calendaring data in JSON. 9. Acknowledgments The author would like to thank the following for their valuable contributions: (TODO:names). This specification originated from the work of the API technical committee of CalConnect, the Calendaring and Scheduling Consortium. 10. References 10.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, . [RFC5545] Desruisseaux, B., Ed., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, DOI 10.17487/RFC5545, September 2009, . Jenkins & Stepanek Expires February 10, 2018 [Page 37] Internet-Draft JSEvent August 2017 [RFC5546] Daboo, C., Ed., "iCalendar Transport-Independent Interoperability Protocol (iTIP)", RFC 5546, DOI 10.17487/RFC5546, December 2009, . [RFC5646] Phillips, A., Ed. and M. Davis, Ed., "Tags for Identifying Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, September 2009, . [RFC5870] Mayrhofer, A. and C. Spanring, "A Uniform Resource Identifier for Geographic Locations ('geo' URI)", RFC 5870, DOI 10.17487/RFC5870, June 2010, . [RFC5988] Nottingham, M., "Web Linking", RFC 5988, DOI 10.17487/RFC5988, October 2010, . [RFC6047] Melnikov, A., Ed., "iCalendar Message-Based Interoperability Protocol (iMIP)", RFC 6047, DOI 10.17487/RFC6047, December 2010, . [RFC6901] Bryan, P., Ed., Zyp, K., and M. Nottingham, Ed., "JavaScript Object Notation (JSON) Pointer", RFC 6901, DOI 10.17487/RFC6901, April 2013, . [RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 2014, . [RFC7265] Kewisch, P., Daboo, C., and M. Douglass, "jCal: The JSON Format for iCalendar", RFC 7265, DOI 10.17487/RFC7265, May 2014, . [RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, DOI 10.17487/RFC7493, March 2015, . [RFC7529] Daboo, C. and G. Yakushev, "Non-Gregorian Recurrence Rules in the Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 7529, DOI 10.17487/RFC7529, May 2015, . Jenkins & Stepanek Expires February 10, 2018 [Page 38] Internet-Draft JSEvent August 2017 [RFC7986] Daboo, C., "New Properties for iCalendar", RFC 7986, DOI 10.17487/RFC7986, October 2016, . 10.2. Informative References [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", . 10.3. URIs [1] https://www.w3.org/TR/2011/REC-css3-color-20110607/#svg-color [2] http://www.iana.org/time-zones Authors' Addresses Neil Jenkins FastMail PO Box 234 Collins St West Melbourne VIC 8007 Australia Email: neilj@fastmailteam.com URI: https://www.fastmail.com Robert Stepanek FastMail PO Box 234 Collins St West Melbourne VIC 8007 Australia Email: rsto@fastmailteam.com URI: https://www.fastmail.com Jenkins & Stepanek Expires February 10, 2018 [Page 39]