Internet Engineering Task Force (IETF)                        P. Kewisch
Request for Comments: 7265                                       Mozilla
Category: Standards Track                                       C. Daboo
ISSN: 2070-1721                                              Apple, Inc.
                                                             M. Douglass
                                                                     RPI
                                                                May 2014
        
Internet Engineering Task Force (IETF)                        P. Kewisch
Request for Comments: 7265                                       Mozilla
Category: Standards Track                                       C. Daboo
ISSN: 2070-1721                                              Apple, Inc.
                                                             M. Douglass
                                                                     RPI
                                                                May 2014
        

jCal: The JSON Format for iCalendar

jCal:iCalendar的JSON格式

Abstract

摘要

This specification defines "jCal", a JSON format for iCalendar data. The iCalendar data format is a text format for capturing and exchanging information normally stored within a calendaring and scheduling application, for example, tasks and events. JSON is a lightweight, text-based, language-independent data interchange format commonly used in Internet applications.

本规范定义了“jCal”,这是iCalendar数据的JSON格式。iCalendar数据格式是一种文本格式,用于捕获和交换通常存储在日历和日程安排应用程序中的信息,例如任务和事件。JSON是一种轻量级的、基于文本的、独立于语言的数据交换格式,常用于Internet应用程序。

Status of This Memo

关于下段备忘

This is an Internet Standards Track document.

这是一份互联网标准跟踪文件。

This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.

本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。

Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7265.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7265.

Copyright Notice

版权公告

Copyright (c) 2014 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2014 IETF信托基金和确定为文件作者的人员。版权所有。

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.

本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。

Table of Contents

目录

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   4
   3.  Converting from iCalendar to jCal . . . . . . . . . . . . . .   4
     3.1.  Pre-processing  . . . . . . . . . . . . . . . . . . . . .   4
     3.2.  iCalendar Stream and Objects (RFC 5545, Section 3.4)  . .   5
     3.3.  Components (RFC 5545, Section 3.6)  . . . . . . . . . . .   6
     3.4.  Properties (RFC 5545, Sections 3.7 and 3.8) . . . . . . .   6
       3.4.1.  Special Cases for Properties  . . . . . . . . . . . .   8
         3.4.1.1.  GEO Property (RFC 5545, Section 3.8.1.6)  . . . .   8
         3.4.1.2.  REQUEST-STATUS Property (RFC 5545, Section 
                   3.8.8.3)  . . . . . . . . . . . . . . . . . . . .   8
     3.5.  Parameters (RFC 5545, Section 3.2)  . . . . . . . . . . .   9
       3.5.1.  VALUE Parameter . . . . . . . . . . . . . . . . . . .  10
       3.5.2.  Multi-value Parameters  . . . . . . . . . . . . . . .  11
     3.6.  Values (RFC 5545, Section 3.3)  . . . . . . . . . . . . .  11
       3.6.1.  Binary (RFC 5545, Section 3.3.1)  . . . . . . . . . .  12
       3.6.2.  Boolean  (RFC 5545, Section 3.3.2)  . . . . . . . . .  12
       3.6.3.  Calendar User Address (RFC 5545, Section 3.3.3) . . .  12
       3.6.4.  Date (RFC 5545, Section 3.3.4)  . . . . . . . . . . .  12
       3.6.5.  Date-Time (RFC 5545, Section 3.3.5) . . . . . . . . .  13
       3.6.6.  Duration (RFC 5545, Section 3.3.6)  . . . . . . . . .  13
       3.6.7.  Float (RFC 5545, Section 3.3.7) . . . . . . . . . . .  14
       3.6.8.  Integer (RFC 5545, Section 3.3.8) . . . . . . . . . .  14
       3.6.9.  Period of Time (RFC 5545, Section 3.3.9)  . . . . . .  14
       3.6.10. Recurrence Rule (RFC 5545, Section 3.3.10)  . . . . .  15
       3.6.11. Text (RFC 5545, Section 3.3.11) . . . . . . . . . . .  16
       3.6.12. Time (RFC 5545, Section 3.3.12) . . . . . . . . . . .  16
       3.6.13. URI (RFC 5545, Section 3.3.13)  . . . . . . . . . . .  17
       3.6.14. UTC Offset (RFC 5545, Section 3.3.14) . . . . . . . .  17
     3.7.  Extensions  . . . . . . . . . . . . . . . . . . . . . . .  17
   4.  Converting from jCal into iCalendar . . . . . . . . . . . . .  17
   5.  Handling Unrecognized Properties or Parameters  . . . . . . .  18
     5.1.  Converting iCalendar into jCal  . . . . . . . . . . . . .  18
     5.2.  Converting jCal into iCalendar  . . . . . . . . . . . . .  19
     5.3.  Examples  . . . . . . . . . . . . . . . . . . . . . . . .  19
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  20
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  21
     7.1.  UNKNOWN iCalendar Value Data Type . . . . . . . . . . . .  22
   8.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .  23
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  23
     9.1.  Normative References  . . . . . . . . . . . . . . . . . .  23
     9.2.  Informative References  . . . . . . . . . . . . . . . . .  24
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
   2.  Conventions Used in This Document . . . . . . . . . . . . . .   4
   3.  Converting from iCalendar to jCal . . . . . . . . . . . . . .   4
     3.1.  Pre-processing  . . . . . . . . . . . . . . . . . . . . .   4
     3.2.  iCalendar Stream and Objects (RFC 5545, Section 3.4)  . .   5
     3.3.  Components (RFC 5545, Section 3.6)  . . . . . . . . . . .   6
     3.4.  Properties (RFC 5545, Sections 3.7 and 3.8) . . . . . . .   6
       3.4.1.  Special Cases for Properties  . . . . . . . . . . . .   8
         3.4.1.1.  GEO Property (RFC 5545, Section 3.8.1.6)  . . . .   8
         3.4.1.2.  REQUEST-STATUS Property (RFC 5545, Section 
                   3.8.8.3)  . . . . . . . . . . . . . . . . . . . .   8
     3.5.  Parameters (RFC 5545, Section 3.2)  . . . . . . . . . . .   9
       3.5.1.  VALUE Parameter . . . . . . . . . . . . . . . . . . .  10
       3.5.2.  Multi-value Parameters  . . . . . . . . . . . . . . .  11
     3.6.  Values (RFC 5545, Section 3.3)  . . . . . . . . . . . . .  11
       3.6.1.  Binary (RFC 5545, Section 3.3.1)  . . . . . . . . . .  12
       3.6.2.  Boolean  (RFC 5545, Section 3.3.2)  . . . . . . . . .  12
       3.6.3.  Calendar User Address (RFC 5545, Section 3.3.3) . . .  12
       3.6.4.  Date (RFC 5545, Section 3.3.4)  . . . . . . . . . . .  12
       3.6.5.  Date-Time (RFC 5545, Section 3.3.5) . . . . . . . . .  13
       3.6.6.  Duration (RFC 5545, Section 3.3.6)  . . . . . . . . .  13
       3.6.7.  Float (RFC 5545, Section 3.3.7) . . . . . . . . . . .  14
       3.6.8.  Integer (RFC 5545, Section 3.3.8) . . . . . . . . . .  14
       3.6.9.  Period of Time (RFC 5545, Section 3.3.9)  . . . . . .  14
       3.6.10. Recurrence Rule (RFC 5545, Section 3.3.10)  . . . . .  15
       3.6.11. Text (RFC 5545, Section 3.3.11) . . . . . . . . . . .  16
       3.6.12. Time (RFC 5545, Section 3.3.12) . . . . . . . . . . .  16
       3.6.13. URI (RFC 5545, Section 3.3.13)  . . . . . . . . . . .  17
       3.6.14. UTC Offset (RFC 5545, Section 3.3.14) . . . . . . . .  17
     3.7.  Extensions  . . . . . . . . . . . . . . . . . . . . . . .  17
   4.  Converting from jCal into iCalendar . . . . . . . . . . . . .  17
   5.  Handling Unrecognized Properties or Parameters  . . . . . . .  18
     5.1.  Converting iCalendar into jCal  . . . . . . . . . . . . .  18
     5.2.  Converting jCal into iCalendar  . . . . . . . . . . . . .  19
     5.3.  Examples  . . . . . . . . . . . . . . . . . . . . . . . .  19
   6.  Security Considerations . . . . . . . . . . . . . . . . . . .  20
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  21
     7.1.  UNKNOWN iCalendar Value Data Type . . . . . . . . . . . .  22
   8.  Acknowledgments . . . . . . . . . . . . . . . . . . . . . . .  23
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  23
     9.1.  Normative References  . . . . . . . . . . . . . . . . . .  23
     9.2.  Informative References  . . . . . . . . . . . . . . . . .  24
        
   Appendix A.  ABNF Schema  . . . . . . . . . . . . . . . . . . . .  25
   Appendix B.  Examples . . . . . . . . . . . . . . . . . . . . . .  27
     B.1.  Example 1 . . . . . . . . . . . . . . . . . . . . . . . .  27
       B.1.1.  iCalendar Data  . . . . . . . . . . . . . . . . . . .  27
       B.1.2.  jCal Data . . . . . . . . . . . . . . . . . . . . . .  27
     B.2.  Example 2 . . . . . . . . . . . . . . . . . . . . . . . .  28
       B.2.1.  iCalendar Data  . . . . . . . . . . . . . . . . . . .  28
       B.2.2.  jCal Data . . . . . . . . . . . . . . . . . . . . . .  29
        
   Appendix A.  ABNF Schema  . . . . . . . . . . . . . . . . . . . .  25
   Appendix B.  Examples . . . . . . . . . . . . . . . . . . . . . .  27
     B.1.  Example 1 . . . . . . . . . . . . . . . . . . . . . . . .  27
       B.1.1.  iCalendar Data  . . . . . . . . . . . . . . . . . . .  27
       B.1.2.  jCal Data . . . . . . . . . . . . . . . . . . . . . .  27
     B.2.  Example 2 . . . . . . . . . . . . . . . . . . . . . . . .  28
       B.2.1.  iCalendar Data  . . . . . . . . . . . . . . . . . . .  28
       B.2.2.  jCal Data . . . . . . . . . . . . . . . . . . . . . .  29
        
1. Introduction
1. 介绍

The iCalendar data format [RFC5545] is a widely deployed interchange format for calendaring and scheduling data. While many applications and services consume and generate calendar data, iCalendar is a specialized format that requires its own parser/generator. In contrast, JSON-based formats as defined in [RFC7159] are the native format for JavaScript widgets and libraries, and it is appropriate to have a standard form of calendar data that is easier to work with than iCalendar.

iCalendar数据格式[RFC5545]是一种广泛部署的日历和日程数据交换格式。虽然许多应用程序和服务使用并生成日历数据,但iCalendar是一种特殊格式,需要自己的解析器/生成器。相比之下,[RFC7159]中定义的基于JSON的格式是JavaScript小部件和库的本机格式,使用比iCalendar更易于使用的标准形式的日历数据是合适的。

The purpose of this specification is to define "jCal", a JSON format for iCalendar data. jCal is defined as a straightforward mapping into JSON from iCalendar, so that iCalendar data can be converted to JSON, and then back to iCalendar, without losing any semantic meaning in the data. Anyone creating jCal calendar data according to this specification will know that their data can be converted to a valid iCalendar representation as well.

本规范的目的是定义“jCal”,一种iCalendar数据的JSON格式。jCal被定义为从iCalendar直接映射到JSON,这样iCalendar数据就可以转换为JSON,然后再返回到iCalendar,而不会丢失数据中的任何语义。根据本规范创建jCal日历数据的任何人都知道,他们的数据也可以转换为有效的iCalendar表示形式。

The key design considerations are essentially the same as those for [RFC6321], that is:

关键设计考虑事项基本上与[RFC6321]相同,即:

Round-tripping (converting an iCalendar instance to jCal and back) will give the same semantic result as the starting point. For example, all components, properties, and property parameters are guaranteed to be preserved.

往返(将iCalendar实例转换为jCal并返回)将给出与起点相同的语义结果。例如,保证保留所有组件、特性和特性参数。

Ordering of elements and case of property and parameter names will not necessarily be preserved.

元素的顺序以及属性和参数名称的大小写不一定会保留。

The iCalendar data semantics are to be preserved, allowing a simple consumer to easily browse the data in jCal. A full understanding of iCalendar is still required in order to modify and/or fully comprehend the calendar data.

iCalendar数据语义将被保留,允许简单的使用者轻松浏览jCal中的数据。为了修改和/或完全理解日历数据,仍然需要完全理解iCalendar。

Extensions to the underlying iCalendar specification must not lead to requiring an update to jCal.

对基础iCalendar规范的扩展不得导致需要更新jCal。

2. Conventions Used in This Document
2. 本文件中使用的公约

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 jCal 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].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照[RFC2119]中所述进行解释。jCal使用的底层格式是JSON。因此,术语“对象”和“数组”以及四种基本类型(字符串、数字、布尔值和null)将按照[RFC7159]第1节中的说明进行解释。

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.

本文档中的一些示例包含用于说明目的的“部分”JSON文档。在这些示例中,三个句号“…”用于表示文档中为紧凑而删除的部分。

3. Converting from iCalendar to jCal
3. 从iCalendar转换为jCal

This section describes how iCalendar data is converted to jCal using a simple mapping between the iCalendar data model and JSON elements. Aside from the formal description in this section, an informative ABNF is specified in Appendix A.

本节介绍如何使用iCalendar数据模型和JSON元素之间的简单映射将iCalendar数据转换为jCal。除了本节中的正式说明外,附录A中还规定了一个信息性ABNF。

In [RFC5545], an iCalendar object comprises a set of "components", "properties", "parameters", and "values". The top level of iCalendar data typically contains a stream of iCalendar objects, each of which can be considered a "component". A "component" can contain other "components" or "properties". A "property" has a "value" and a set of zero or more "parameters". Each of these entities have a representation in jCal, defined in the following sections. The representation of an iCalendar object in JSON will be named "jCal object" throughout this document.

在[RFC5545]中,iCalendar对象包含一组“组件”、“属性”、“参数”和“值”。iCalendar数据的顶层通常包含一个iCalendar对象流,每个对象都可以被视为“组件”。“组件”可以包含其他“组件”或“属性”。“属性”有一个“值”和一组零个或多个“参数”。这些实体中的每一个都有一个在jCal中的表示,定义见以下部分。在本文档中,iCalendar对象在JSON中的表示形式将命名为“jCal对象”。

3.1. Pre-processing
3.1. 预处理

iCalendar uses a line-folding mechanism to limit lines of data to a maximum line length (typically 75 octets) to ensure the maximum likelihood of preserving data integrity as it is transported via various means (e.g., email) -- see Section 3.1 of [RFC5545].

iCalendar使用折线机制将数据线限制在最大线长度(通常为75个八位字节),以确保通过各种方式(如电子邮件)传输数据时最大可能保持数据完整性——请参见[RFC5545]第3.1节。

iCalendar data uses an "escape" character sequence for text values and property parameter values. See Sections 3.1 and 3.3 of [RFC5545] as well as [RFC6868].

iCalendar数据对文本值和特性参数值使用“转义”字符序列。参见[RFC5545]和[RFC6868]的第3.1节和第3.3节。

There is a subtle difference in the number representations between JSON and iCalendar. While in iCalendar, a number may have leading zeros, as well as a leading plus sign; this is not the case in JSON. Numbers should be represented in whatever way needed for the underlying format.

JSON和iCalendar在数字表示上存在细微的差异。在iCalendar中,数字可能有前导零和前导加号;JSON中并非如此。数字应该以基础格式所需的任何方式表示。

When converting from iCalendar to jCal: First, iCalendar lines MUST be unfolded. Afterwards, any iCalendar escaping MUST be unescaped. Finally, JSON escaping, as described in Section 7 of [RFC7159], MUST be applied. The reverse order applies when converting from jCal to iCalendar, which is further described in Section 4.

从iCalendar转换为jCal时:首先,必须展开iCalendar行。之后,任何iCalendar逃逸都必须逃脱。最后,必须应用[RFC7159]第7节所述的JSON转义。当从jCal转换为iCalendar时,相反的顺序适用,这将在第4节中进一步描述。

iCalendar uses a base64 encoding for binary data. However, it does not restrict the encoding from being applied to non-binary value types. So, the following rules are applied when processing a property with the "ENCODING" property parameter set to "BASE64":

iCalendar对二进制数据使用base64编码。但是,它并不限制编码应用于非二进制值类型。因此,在处理“ENCODING”属性参数设置为“BASE64”的属性时,将应用以下规则:

o If the property value type is "BINARY", the base64 encoding MUST be preserved.

o 如果属性值类型为“BINARY”,则必须保留base64编码。

o If the value type is not "BINARY", the "ENCODING" property parameter MUST be removed, and the value MUST be base64 decoded.

o 如果值类型不是“二进制”,则必须删除“ENCODING”属性参数,并且必须对值进行base64解码。

When base64 encoding is used, it MUST conform to Section 4 of [RFC4648], which is the base64 method used in [RFC5545].

当使用base64编码时,它必须符合[RFC4648]的第4节,这是[RFC5545]中使用的base64方法。

One key difference in the formatting of values used in iCalendar and jCal is that in jCal, the specification uses date/time values aligned with the extended format of [ISO.8601.2004], which is more commonly used in Internet applications that make use of the JSON format. The sections of this document describing the various date and time formats contain more information on the use of the complete representation, reduced accuracy, or truncated representation.

iCalendar和jCal中使用的值格式的一个关键区别是,在jCal中,规范使用与[ISO.8601.2004]扩展格式一致的日期/时间值,这在使用JSON格式的互联网应用程序中更常用。本文档中描述各种日期和时间格式的部分包含有关使用完整表示法、降低精度或截断表示法的更多信息。

3.2. iCalendar Stream and Objects (RFC 5545, Section 3.4)
3.2. iCalendar流和对象(RFC 5545,第3.4节)

At the top level of the iCalendar object model is an "iCalendar stream". This stream encompasses multiple "iCalendar objects". As the typical use case is transporting a single iCalendar object, there is no defined equivalent to an "iCalendar stream" in jCal. To transport multiple jCal objects in a stream, a simple JSON array can be used.

在iCalendar对象模型的顶层是一个“iCalendar流”。此流包含多个“iCalendar对象”。由于典型的用例是传输单个iCalendar对象,因此jCal中没有定义与“iCalendar流”等价的对象。要在一个流中传输多个jCal对象,可以使用一个简单的JSON数组。

Example:

例子:

   ["vcalendar",
     [ /* Add jCal properties in place of this comment */ ],
     [ /* Add jCal components in place of this comment */ ]
   ]
        
   ["vcalendar",
     [ /* Add jCal properties in place of this comment */ ],
     [ /* Add jCal components in place of this comment */ ]
   ]
        
3.3. Components (RFC 5545, Section 3.6)
3.3. 部件(RFC 5545,第3.6节)

Each iCalendar component, delimited by "BEGIN" and "END", will be converted to a fixed-length array with three fields that have a specific structure:

每个iCalendar组件(由“BEGIN”和“END”分隔)将转换为具有三个特定结构的字段的固定长度数组:

1. A string with the name of the iCalendar component, but in lowercase.

1. 带有iCalendar组件名称但小写的字符串。

2. An array of jCal properties as described in Section 3.4.

2. 第3.4节中描述的jCal属性数组。

3. An array of jCal components, representing the sub-components of the component in question.

3. jCal组件的数组,表示相关组件的子组件。

This mapping applies to the top level iCalendar objects, as well as individual sub-components in the same way. The iCalendar to jCal component mapping is valid for both current iCalendar components and any new iCalendar components added in the future. Conversion is to be done in the same way.

此映射同样适用于顶级iCalendar对象以及单个子组件。iCalendar到jCal组件的映射对当前iCalendar组件和将来添加的任何新iCalendar组件都有效。转换应以相同的方式进行。

While the grouping of properties and sub-components does not retain the original order specified in the iCalendar data, the semantics of a component are preserved.

虽然特性和子组件的分组不会保留iCalendar数据中指定的原始顺序,但组件的语义会保留下来。

Example:

例子:

   ["vevent",
     [ /* Add jCal properties in place of this comment */ ],
     [ /* Add jCal components in place of this comment */ ]
   ]
        
   ["vevent",
     [ /* Add jCal properties in place of this comment */ ],
     [ /* Add jCal components in place of this comment */ ]
   ]
        
3.4. Properties (RFC 5545, Sections 3.7 and 3.8)
3.4. 属性(RFC 5545,第3.7节和第3.8节)

iCalendar properties, whether they apply to the "VCALENDAR" object or to a component, are handled in a consistent way in the jCal format.

iCalendar属性,无论它们应用于“VCALENDAR”对象还是组件,都以jCal格式以一致的方式处理。

In jCal, each individual iCalendar property MUST be represented by an array with three fixed elements, followed by one or more additional elements, depending on if the property is a multi-valued property as described in Section 3.1.2 of [RFC5545].

在jCal中,每个单独的iCalendar属性必须由一个包含三个固定元素的数组表示,后跟一个或多个附加元素,具体取决于该属性是否为[RFC5545]第3.1.2节所述的多值属性。

The array consists of the following fixed elements:

阵列由以下固定元素组成:

1. The name of the property, as a lowercase string. The iCalendar format specifies that property names are case insensitive and recommends that they be rendered in uppercase. In jCal, they MUST be in lowercase.

1. 属性的名称,以小写字符串表示。iCalendar格式指定属性名称不区分大小写,并建议以大写形式呈现。在jCal中,它们必须是小写的。

2. An object containing the parameters as described in Section 3.5. If the property has no parameters, an empty object is used to represent that.

2. 包含第3.5节所述参数的对象。如果属性没有参数,则使用空对象表示该属性。

3. The type identifier string of the value, in lowercase. Due to special casing of certain properties as described in Section 3.4.1, it is important that parsers check both the type identifier and the value data type and do not rely on assumptions based on the property name.

3. 值的类型标识符字符串,小写。由于第3.4.1节中描述的某些属性的特殊大小写,解析器必须检查类型标识符和值数据类型,并且不依赖基于属性名称的假设。

The remaining elements of the array are used for one or more values of the property. For single-valued properties, the array has exactly four elements; for multi-valued properties, as described in Section 3.1.2 of [RFC5545], each value is another element, and there can be any number of additional elements.

数组的其余元素用于属性的一个或多个值。对于单值属性,数组正好有四个元素;对于多值属性,如[RFC5545]第3.1.2节所述,每个值是另一个元素,可以有任意数量的附加元素。

In the following example, the "categories" property is multi-valued and has two values, while the summary property is single-valued:

在以下示例中,“categories”属性是多值的,有两个值,而summary属性是单值的:

Example:

例子:

   ["vevent",
     [
       ["summary", {}, "text", "Meeting with Fred"],
       ["categories", {}, "text", "Meetings", "Work"]
       ...
     ],
     [ /* sub-components */ ]
   ]
        
   ["vevent",
     [
       ["summary", {}, "text", "Meeting with Fred"],
       ["categories", {}, "text", "Meetings", "Work"]
       ...
     ],
     [ /* sub-components */ ]
   ]
        
3.4.1. Special Cases for Properties
3.4.1. 财产的特殊情况

This section describes some properties that have special handling when converting to jCal.

本节介绍一些在转换为jCal时具有特殊处理的属性。

3.4.1.1. GEO Property (RFC 5545, Section 3.8.1.6)
3.4.1.1. 地质属性(RFC 5545,第3.8.1.6节)

In iCalendar, the "GEO" property value is defined as a semicolon-separated list of two "FLOAT" values, the first representing latitude and the second longitude.

在iCalendar中,“GEO”属性值定义为两个“FLOAT”值的分号分隔列表,第一个值表示纬度,第二个值表示经度。

In jCal, the value for the "geo" property value is represented as an array of two values. The first value of the property represents the latitude; the second value represents the longitude.

在jCal中,“geo”属性值的值表示为两个值的数组。属性的第一个值表示纬度;第二个值表示经度。

When converting from jCal to iCalendar, be careful to use a semicolon as the separator between the two values as required by [RFC5545].

从jCal转换为iCalendar时,请按照[RFC5545]的要求,小心使用分号作为两个值之间的分隔符。

When converting from jCal to iCalendar, the two values MUST be converted using a semicolon as the separator character.

从jCal转换为iCalendar时,必须使用分号作为分隔符来转换这两个值。

Example

实例

   ["vevent",
     [
       ["geo", {}, "float", [ 37.386013, -122.082932 ] ]
       ...
     ],
     ...
   ]
        
   ["vevent",
     [
       ["geo", {}, "float", [ 37.386013, -122.082932 ] ]
       ...
     ],
     ...
   ]
        
3.4.1.2. REQUEST-STATUS Property (RFC 5545, Section 3.8.8.3)
3.4.1.2. 请求状态属性(RFC 5545,第3.8.8.3节)

In iCalendar, the "REQUEST-STATUS" property value is defined as a semicolon-separated list of two or three "TEXT" values. The first represents a code, the second a description, and the third any additional data.

在iCalendar中,“REQUEST-STATUS”属性值定义为两个或三个“TEXT”值的分号分隔列表。第一个表示代码,第二个表示说明,第三个表示任何附加数据。

In jCal, the value for the "request-status" property value is represented as an array with two or three values. The first array element corresponds to the code, the second element corresponds to the description, and the third element corresponds to the additional data. Each value is represented using a string value. If there is no additional data in the iCalendar value, the last element of the array SHOULD NOT be present.

在jCal中,“请求状态”属性值的值表示为一个包含两个或三个值的数组。第一个数组元素对应于代码,第二个元素对应于描述,第三个元素对应于附加数据。每个值都使用字符串值表示。如果iCalendar值中没有其他数据,则数组的最后一个元素不应存在。

When converting from jCal to iCalendar, the two or three values MUST be converted using a semicolon as the separator character.

从jCal转换为iCalendar时,必须使用分号作为分隔符转换两个或三个值。

iCalendar Example:

iCalendar示例:

   BEGIN:VEVENT
   ...
   REQUEST-STATUS:2.0;Success
   REQUEST-STATUS:3.7;Invalid calendar user;ATTENDEE:
    mailto:jsmith@example.com
   ...
   END:VEVENT
        
   BEGIN:VEVENT
   ...
   REQUEST-STATUS:2.0;Success
   REQUEST-STATUS:3.7;Invalid calendar user;ATTENDEE:
    mailto:jsmith@example.com
   ...
   END:VEVENT
        

jCal Example:

jCal示例:

   ["vevent":
     [
       ["request-status", {}, "text", ["2.0", "Success"] ],
       ["request-status", {}, "text",
          [
           "3.7",
           "Invalid calendar user",
           "ATTENDEE:mailto:jsmith@example.org"
          ]
       ],
       ...
     ],
     ...
   ]
        
   ["vevent":
     [
       ["request-status", {}, "text", ["2.0", "Success"] ],
       ["request-status", {}, "text",
          [
           "3.7",
           "Invalid calendar user",
           "ATTENDEE:mailto:jsmith@example.org"
          ]
       ],
       ...
     ],
     ...
   ]
        
3.5. Parameters (RFC 5545, Section 3.2)
3.5. 参数(RFC 5545,第3.2节)

Property parameters are represented as a JSON object where each key-value pair represents the iCalendar parameter name and its value. The name of the parameter MUST be in lowercase; the original case of the parameter value MUST be preserved. For example, the "PARTSTAT" property parameter is represented in jCal by the "partstat" key. Any new iCalendar parameters added in the future will be converted in the same way.

属性参数表示为JSON对象,其中每个键值对表示iCalendar参数名称及其值。参数名称必须为小写;必须保留参数值的原始大小写。例如,“PARTSTAT”属性参数在jCal中由“PARTSTAT”键表示。将来添加的任何新iCalendar参数都将以相同的方式进行转换。

Example:

例子:

   ["vevent":
     [
       ["attendee",
        {
          "partstat": "ACCEPTED",
          "rsvp": "TRUE",
          "role": "REQ-PARTICIPANT"
        },
        "cal-address",
        "mailto:jsmith@example.org"
       ],
       ["summary", {}, "text", "Meeting"],
       ...
     ],
     ...
   ]
        
   ["vevent":
     [
       ["attendee",
        {
          "partstat": "ACCEPTED",
          "rsvp": "TRUE",
          "role": "REQ-PARTICIPANT"
        },
        "cal-address",
        "mailto:jsmith@example.org"
       ],
       ["summary", {}, "text", "Meeting"],
       ...
     ],
     ...
   ]
        
3.5.1. VALUE Parameter
3.5.1. 值参数

iCalendar defines a "VALUE" property parameter (Section 3.2.20 of [RFC5545]). This property parameter MUST NOT be added to the parameters object. Instead, the value type is signaled through the type identifier in the third element of the array describing the property. When converting a property from iCalendar to jCal, the value type is determined as follows:

iCalendar定义了一个“值”属性参数(RFC5545的第3.2.20节)。不得将此属性参数添加到parameters对象中。相反,值类型通过描述属性的数组的第三个元素中的类型标识符发出信号。将特性从iCalendar转换为jCal时,值类型确定如下:

1. If the property has a "VALUE" parameter, that parameter's value is used as the value type.

1. 如果属性具有“值”参数,则该参数的值将用作值类型。

2. If the property has no "VALUE" parameter but has a default value type, the default value type is used.

2. 如果属性没有“值”参数,但具有默认值类型,则使用默认值类型。

3. If the property has no "VALUE" parameter and has no default value type, "unknown" is used.

3. 如果属性没有“VALUE”参数,也没有默认值类型,则使用“unknown”。

Converting from jCal into iCalendar is done as follows:

从jCal到iCalendar的转换如下所示:

1. If the property's value type is "unknown", no "VALUE" parameter is included.

1. 如果属性的值类型为“未知”,则不包括“值”参数。

2. If the property's value type is the default type for that property, no "VALUE" parameter is included.

2. 如果属性的值类型是该属性的默认类型,则不包括“值”参数。

3. Otherwise, a "VALUE" parameter is included, and the value type is used as the parameter value.

3. 否则,将包含一个“值”参数,并将值类型用作参数值。

See Section 5 for information on handling unknown value types.

有关处理未知值类型的信息,请参见第5节。

3.5.2. Multi-value Parameters
3.5.2. 多值参数

In [RFC5545], some parameters allow using a COMMA-separated list of values. To ease processing in jCal, the value of such parameters MUST be represented in an array containing the separated values. The array elements MUST be string values. Single-value parameters can be represented using either a single string value or an array with one string element. A jCal parser MUST be able to understand both value data types. Examples of such parameters are the iCalendar "DELEGATED-FROM" and "DELEGATED-TO" parameters; more such parameters may be added in extensions.

在[RFC5545]中,一些参数允许使用逗号分隔的值列表。为了简化jCal中的处理,这些参数的值必须在包含分隔值的数组中表示。数组元素必须是字符串值。单值参数可以使用单个字符串值或带有一个字符串元素的数组来表示。jCal解析器必须能够理解这两种值数据类型。此类参数的示例包括iCalendar的“委托自”和“委托至”参数;可以在扩展中添加更多这样的参数。

The iCalendar specification requires encapsulation between DQUOTE characters if a parameter value contains a colon, a semicolon, or a comma. These extra DQUOTE characters do not belong to the actual parameter value, and hence are not included when the parameter is converted to jCal.

如果参数值包含冒号、分号或逗号,则iCalendar规范要求在DQUOTE字符之间进行封装。这些额外的DQUOTE字符不属于实际参数值,因此在将参数转换为jCal时不包括在内。

Example 1:

例1:

   ["attendee",
    {
      "delegated-to": ["mailto:jdoe@example.org",
                       "mailto:jqpublic@example.org"]
    },
    "cal-address",
    "mailto:jsmith@example.org"
   ]
        
   ["attendee",
    {
      "delegated-to": ["mailto:jdoe@example.org",
                       "mailto:jqpublic@example.org"]
    },
    "cal-address",
    "mailto:jsmith@example.org"
   ]
        

Example 2:

例2:

   ["attendee",
    {
      "delegated-to": "mailto:jdoe@example.org"
    },
    "cal-address",
    "mailto:jsmith@example.org"
   ]
        
   ["attendee",
    {
      "delegated-to": "mailto:jdoe@example.org"
    },
    "cal-address",
    "mailto:jsmith@example.org"
   ]
        
3.6. Values (RFC 5545, Section 3.3)
3.6. 数值(RFC 5545,第3.3节)

The following subsections specify how iCalendar property value data types, which are defined in the subsections of [RFC5545], Section 3.3, are represented in jCal.

以下小节指定了[RFC5545]第3.3节小节中定义的iCalendar属性值数据类型在jCal中的表示方式。

3.6.1. Binary (RFC 5545, Section 3.3.1)
3.6.1. 二进制(RFC 5545,第3.3.1节)

Description: iCalendar "BINARY" property values are represented by a property with the type identifier "binary". The value element is a JSON string, encoded with base64 encoding as specified in Section 4 of [RFC4648].

描述:iCalendar“BINARY”属性值由类型标识符为“BINARY”的属性表示。value元素是一个JSON字符串,使用[RFC4648]第4节中指定的base64编码进行编码。

Example:

例子:

["attach", {}, "binary", "SGVsbG8gV29ybGQh"]

[“附加”、{}、“二进制”、“SGVsbG8gV29ybGQh”]

3.6.2. Boolean (RFC 5545, Section 3.3.2)
3.6.2. 布尔值(RFC 5545,第3.3.2节)

Description: iCalendar "BOOLEAN" property values are represented by a property with the type identifier "boolean". The value is a JSON boolean value.

描述:iCalendar“BOOLEAN”属性值由类型标识符为“BOOLEAN”的属性表示。该值是一个JSON布尔值。

Example:

例子:

["x-non-smoking", {}, "boolean", true]

[“x-非吸烟区,{},“布尔”,真]

3.6.3. Calendar User Address (RFC 5545, Section 3.3.3)
3.6.3. 日历用户地址(RFC 5545,第3.3.3节)

Description: iCalendar "CAL-ADDRESS" property values are represented by a property with the type identifier "cal-address". The value is a JSON string with the URI as described in [RFC3986].

描述:iCalendar“CAL-ADDRESS”属性值由类型标识符为“CAL-ADDRESS”的属性表示。该值是一个JSON字符串,URI如[RFC3986]所述。

Example:

例子:

   ["attendee", {}, "cal-address", "mailto:kewisch@example.com"]
        
   ["attendee", {}, "cal-address", "mailto:kewisch@example.com"]
        
3.6.4. Date (RFC 5545, Section 3.3.4)
3.6.4. 日期(RFC 5545,第3.3.4节)

Description: iCalendar "DATE" property values are represented by a property with the type identifier "date". The value elements are JSON strings with the same date value specified by [RFC5545], but represented using the extended format of the complete representation specified in [ISO.8601.2004], Section 4.1.2.2. Other variations, for example, representation with reduced accuracy, MUST NOT be used.

描述:iCalendar“DATE”属性值由类型标识符为“DATE”的属性表示。值元素是JSON字符串,具有[RFC5545]指定的相同日期值,但使用[ISO.8601.2004]第4.1.2.2节规定的完整表示的扩展格式表示。不得使用其他变体,例如精度降低的表示。

ABNF Schema:

ABNF模式:

; year, month, and day rules are ; defined in [ISO.8601.2004], Section 2.2. date = year "-" month "-" day ;YYYY-MM-DD

; 年、月、日规则为:;定义见[ISO.8601.2004]第2.2节。日期=年“-”月“-”日;YYYY-MM-DD

Example:

例子:

["dtstart", {}, "date", "2011-05-17"]

[“dtstart”,{},“date”,“2011-05-17”]

3.6.5. Date-Time (RFC 5545, Section 3.3.5)
3.6.5. 日期时间(RFC 5545,第3.3.5节)

Description: iCalendar "DATE-TIME" property values are represented by a property with the type identifier "date-time". The value elements are JSON strings with the same date value specified by [RFC5545], but represented using the extended format of the complete representation specified in [ISO.8601.2004], Section 4.3.2. Other variations, for example, representation with reduced accuracy, MUST NOT be used. The same restrictions apply with respect to leap seconds and time zone offsets as specified in [RFC5545], Section 3.3.5.

描述:iCalendar“日期-时间”属性值由类型标识符为“日期-时间”的属性表示。值元素是JSON字符串,具有[RFC5545]指定的相同日期值,但使用[ISO.8601.2004]第4.3.2节规定的完整表示的扩展格式表示。不得使用其他变体,例如精度降低的表示。相同的限制适用于[RFC5545]第3.3.5节中规定的闰秒和时区偏移。

ABNF Schema:

ABNF模式:

   ; year, month, day, hour, minute, and second rules are
   ; defined in [ISO.8601.2004], Section 2.2.
   ; The zone identifier is described in [ISO.8601.2004], Section 4.3.2.
   date-complete = year "-" month "-" day ;YYYY-MM-DD
   time-complete =  hour ":" minute ":" second [zone] ; HH:MM:SS
   datetime = date-complete "T" time-complete
        
   ; year, month, day, hour, minute, and second rules are
   ; defined in [ISO.8601.2004], Section 2.2.
   ; The zone identifier is described in [ISO.8601.2004], Section 4.3.2.
   date-complete = year "-" month "-" day ;YYYY-MM-DD
   time-complete =  hour ":" minute ":" second [zone] ; HH:MM:SS
   datetime = date-complete "T" time-complete
        

Examples:

示例:

   ["dtstart", {}, "date-time", "2012-10-17T12:00:00"],
   ["dtstamp", {}, "date-time", "2012-10-17T12:00:00Z"],
   ["dtend",
    { "tzid": "Europe/Berlin" },
    "date-time",
    "2011-10-17T13:00:00"
   ]
        
   ["dtstart", {}, "date-time", "2012-10-17T12:00:00"],
   ["dtstamp", {}, "date-time", "2012-10-17T12:00:00Z"],
   ["dtend",
    { "tzid": "Europe/Berlin" },
    "date-time",
    "2011-10-17T13:00:00"
   ]
        
3.6.6. Duration (RFC 5545, Section 3.3.6)
3.6.6. 持续时间(RFC 5545,第3.3.6节)

Description: iCalendar "DURATION" property values are represented by a property with the type identifier "duration". The value elements are JSON strings with the same duration value specified by [RFC5545].

描述:iCalendar“DURATION”属性值由类型标识符为“DURATION”的属性表示。value元素是JSON字符串,具有[RFC5545]指定的相同持续时间值。

Example:

例子:

["duration", {}, "duration", "P1D"]

[“持续时间”、{}、“持续时间”、“P1D”]

3.6.7. Float (RFC 5545, Section 3.3.7)
3.6.7. 浮子(RFC 5545,第3.3.7节)

Description: iCalendar "FLOAT" property values are represented by a property with the type identifier "float". The value elements are JSON primitive number values.

描述:iCalendar“FLOAT”属性值由类型标识符为“FLOAT”的属性表示。value元素是JSON原语数字值。

Example:

例子:

["x-grade", {}, "float", 1.3]

[“x级”,{},“浮动”,1.3]

3.6.8. Integer (RFC 5545, Section 3.3.8)
3.6.8. 整数(RFC 5545,第3.3.8节)

Description: vCard "INTEGER" property values are represented by a property with the type identifier "integer". The value elements are JSON primitive number values that MUST resolve to an integer value in the range specified in [RFC5545], Section 3.3.8. Thus, a fractional and/or exponential part are only allowed under limited circumstances.

说明:vCard“INTEGER”属性值由类型标识符为“INTEGER”的属性表示。value元素是JSON原语数字值,必须解析为[RFC5545]第3.3.8节规定范围内的整数值。因此,分数和/或指数部分仅在有限的情况下允许。

Examples:

示例:

["percent-complete", {}, "integer", 42]

[“完成百分比”{},“整数”,42]

3.6.9. Period of Time (RFC 5545, Section 3.3.9)
3.6.9. 时间段(RFC 5545,第3.3.9节)

Description: iCalendar "PERIOD" property values are represented by a jCal property with the type identifier "period". The value element is an array of JSON strings, with the first element representing the start of the period and the second element representing the end of the period. As in [RFC5545], the start of the period is always formatted as a date-time value, and the end of the period MUST be either a date-time or duration value. Any date, date-time, or duration values contained in the period value MUST be formatted in accordance to the rules for date, date-time, or duration values specified in this document.

描述:iCalendar“PERIOD”属性值由类型标识符为“PERIOD”的jCal属性表示。value元素是一个JSON字符串数组,第一个元素表示时段的开始,第二个元素表示时段的结束。如[RFC5545]中所述,周期的开始总是格式化为日期时间值,周期的结束必须是日期时间或持续时间值。期间值中包含的任何日期、日期时间或持续时间值必须按照本文档中指定的日期、日期时间或持续时间值规则进行格式化。

Example:

例子:

   ["freebusy",
    { "fbtype": "FREE" },
    "period",
    ["1997-03-08T16:00:00Z", "P1D"]
   ]
        
   ["freebusy",
    { "fbtype": "FREE" },
    "period",
    ["1997-03-08T16:00:00Z", "P1D"]
   ]
        
3.6.10. Recurrence Rule (RFC 5545, Section 3.3.10)
3.6.10. 重复规则(RFC 5545,第3.3.10节)

Description: iCalendar "RECUR" property values are represented by a property with the type identifier "recur". The value elements are objects describing the structured data as specified by [RFC5545]. Each rule part is described by the combination of key and value. The key specifies the name of the rule part and MUST be converted to lowercase. The value of the rule part MUST be mapped by the following rules:

描述:iCalendar“RECUR”属性值由类型标识符为“RECUR”的属性表示。值元素是描述[RFC5545]指定的结构化数据的对象。每个规则部分都用键和值的组合来描述。该键指定规则部分的名称,并且必须转换为小写。规则部分的值必须由以下规则映射:

* The value of the "freq" and "wkst" rule parts MUST be a string as specified in [RFC5545], with case preserved.

* “freq”和“wkst”规则部分的值必须是[RFC5545]中指定的字符串,并保留大小写。

* The value of the "until" rule part MUST be a date or date-time value formatted in accordance to the rules for date or date-time specified in this document.

* “截止”规则部分的值必须是根据本文件中规定的日期或日期时间规则格式化的日期或日期时间值。

* The "count" and "interval" rule parts MUST be specified as a single JSON number value.

* “计数”和“间隔”规则部分必须指定为单个JSON数字值。

* The following rule parts can have one or more numeric values: "bysecond", "byminute", "byhour", "bymonthday", "byyearday", "byweekno", "bymonth", and "bysetpos". If a rule part contains multiple values, an array of numbers MUST be used for that rule part. Single-valued rule parts can be represented by either using a single number value, omitting the array completely, or using an array with one number element. A jCal parser MUST be able to understand both data types.

* 以下规则部分可以有一个或多个数值:“bysecond”、“byminute”、“byhour”、“bymonthday”、“byyearday”、“byweekno”、“bymonth”和“bysetpos”。如果规则部分包含多个值,则该规则部分必须使用数字数组。单值规则部分可以通过使用单个数值、完全省略数组或使用带有一个数字元素的数组来表示。jCal解析器必须能够理解这两种数据类型。

* Similarly, the "byday" rule part can have one or more string values. If it contains multiple values, an array of strings MUST be used. As before, a single-valued rule part can be represented using either a single string value or an array with one string element, both of which a jCal parser MUST be able to understand.

* 类似地,“byday”规则部分可以有一个或多个字符串值。如果它包含多个值,则必须使用字符串数组。与前面一样,单值规则部分可以使用单个字符串值或带有一个字符串元素的数组来表示,jCal解析器必须能够理解这两者。

Example 1:

例1:

   ["rrule",
    {},
    "recur",
    {
      "freq": "YEARLY",
      "count": 5,
      "byday": [ "-1SU", "2MO" ],
      "bymonth": 10
    }
   ]
        
   ["rrule",
    {},
    "recur",
    {
      "freq": "YEARLY",
      "count": 5,
      "byday": [ "-1SU", "2MO" ],
      "bymonth": 10
    }
   ]
        

Example 2:

例2:

   ["rrule",
    {},
    "recur",
    {
      "freq": "MONTHLY",
      "interval": 2,
      "bymonthday": [ 1, 15, -1 ],
      "until": "2013-10-01"
    }
   ]
        
   ["rrule",
    {},
    "recur",
    {
      "freq": "MONTHLY",
      "interval": 2,
      "bymonthday": [ 1, 15, -1 ],
      "until": "2013-10-01"
    }
   ]
        
3.6.11. Text (RFC 5545, Section 3.3.11)
3.6.11. 文本(RFC 5545,第3.3.11节)

Description: iCalendar "TEXT" property values are represented by a property with the type identifier "text". The value elements are JSON strings.

描述:iCalendar“TEXT”属性值由类型标识符为“TEXT”的属性表示。值元素是JSON字符串。

Example:

例子:

["comment", {}, "text", "hello, world"]

[“评论”,{},“文本”,“你好,世界”]

3.6.12. Time (RFC 5545, Section 3.3.12)
3.6.12. 时间(RFC 5545,第3.3.12节)

Description: iCalendar "TIME" property values are represented by a property with the type identifier "time". The value elements are JSON strings with the same time value specified by [RFC5545], but represented using the extended format of the complete representation specified in [ISO.8601.2004], Section 4.2.2.2. Other variations, for example, representation with reduced accuracy, MUST NOT be used. The same restrictions apply with respect to leap seconds, time fractions, and time zone offsets as specified in [RFC5545], Section 3.3.12.

描述:iCalendar“TIME”属性值由类型标识符为“TIME”的属性表示。值元素是JSON字符串,具有[RFC5545]指定的相同时间值,但使用[ISO.8601.2004]第4.2.2.2节规定的完整表示的扩展格式表示。不得使用其他变体,例如精度降低的表示。相同的限制适用于[RFC5545]第3.3.12节中规定的闰秒、时间分数和时区偏移。

ABNF Schema:

ABNF模式:

   ; hour, minute, and second rules are
   ; defined in [ISO.8601.2004], Section 2.2.
   ; The zone identifier is described in [ISO.8601.2004], Section 4.3.2.
   time-complete =  hour ":" minute ":" second [zone] ; HH:MM:SS
        
   ; hour, minute, and second rules are
   ; defined in [ISO.8601.2004], Section 2.2.
   ; The zone identifier is described in [ISO.8601.2004], Section 4.3.2.
   time-complete =  hour ":" minute ":" second [zone] ; HH:MM:SS
        

Example:

例子:

   ["x-time-local", {}, "time", "12:30:00"],
   ["x-time-utc", {}, "time", "12:30:00Z"],
   ["x-time-offset", { "tzid": "Europe/Berlin" }, "time", "12:30:00"]
        
   ["x-time-local", {}, "time", "12:30:00"],
   ["x-time-utc", {}, "time", "12:30:00Z"],
   ["x-time-offset", { "tzid": "Europe/Berlin" }, "time", "12:30:00"]
        
3.6.13. URI (RFC 5545, Section 3.3.13)
3.6.13. URI(RFC 5545,第3.3.13节)

Description: iCalendar "URI" property values are represented by a property with the type identifier "uri". The value elements are JSON strings representing the URI.

描述:iCalendar“URI”属性值由类型标识符为“URI”的属性表示。值元素是表示URI的JSON字符串。

Example:

例子:

   ["tzurl", {}, "uri", "http://example.org/tz/Europe-Berlin.ics"]
        
   ["tzurl", {}, "uri", "http://example.org/tz/Europe-Berlin.ics"]
        
3.6.14. UTC Offset (RFC 5545, Section 3.3.14)
3.6.14. UTC偏移量(RFC 5545,第3.3.14节)

Description: iCalendar "UTC-OFFSET" property values are represented by a property with the type identifier "utc-offset". The value elements are JSON strings with the same UTC offset value specified by [RFC5545], with the exception that the hour and minute components are separated by a ":" character, for consistency with the [ISO.8601.2004] time zone offset, extended format.

说明:iCalendar“UTC-OFFSET”属性值由类型标识符为“UTC OFFSET”的属性表示。值元素是JSON字符串,具有[RFC5545]指定的相同UTC偏移值,但小时和分钟分量由“:”字符分隔,以与[ISO.8601.2004]时区偏移保持一致,扩展格式除外。

Example:

例子:

   ["tzoffsetfrom", {}, "utc-offset", "-05:00"],
   ["tzoffsetto", {}, "utc-offset", "+12:45"]
        
   ["tzoffsetfrom", {}, "utc-offset", "-05:00"],
   ["tzoffsetto", {}, "utc-offset", "+12:45"]
        
3.7. Extensions
3.7. 扩展

iCalendar extension properties and property parameters (those with an "X-" prefix in their name) are handled in the same way as other properties and property parameters: the property is represented by an array, and the property parameter is represented by an object. The property or parameter name uses the same name as for the iCalendar extension, but in lowercase. For example, the "X-FOO" property in iCalendar turns into the "x-foo" jCal property. See Section 5 for how to deal with default values for unrecognized extension properties or property parameters.

iCalendar扩展属性和属性参数(名称中带有“X-”前缀的属性和参数)的处理方式与其他属性和属性参数相同:属性由数组表示,属性参数由对象表示。属性或参数名称使用与iCalendar扩展名相同的名称,但使用小写形式。例如,iCalendar中的“X-FOO”属性变为“X-FOO”jCal属性。有关如何处理无法识别的扩展属性或属性参数的默认值,请参见第5节。

4. Converting from jCal into iCalendar
4. 从jCal转换为iCalendar

Converting jCal to iCalendar reverses the process described in Section 3. This section describes a few additional requirements for conversion.

将jCal转换为iCalendar与第3节中描述的过程相反。本节描述了转换的一些附加要求。

When converting component, property, and property parameter names, the names SHOULD be converted to uppercase. Although iCalendar names are case insensitive, common practice is to keep them all uppercase following the actual definitions in [RFC5545].

转换组件、属性和属性参数名称时,名称应转换为大写。尽管iCalendar名称不区分大小写,但通常的做法是按照[RFC5545]中的实际定义将它们全部大写。

During conversion, JSON escaping MUST be unescaped. Afterwards, iCalendar escaping, as defined by [RFC5545] and [RFC6868], MUST be applied. Finally, long lines SHOULD be folded as described in [RFC5545], Section 3.1.

在转换过程中,必须取消JSON转义。之后,必须应用[RFC5545]和[RFC6868]定义的iCalendar转义。最后,应按照[RFC5545]第3.1节所述折叠长管线。

Non-binary value types MUST NOT be base64 encoded.

非二进制值类型不得采用base64编码。

When converting to iCalendar, the VALUE parameter MUST be added to properties whose default value type is unknown, but do not have a jCal type identifier "unknown". The VALUE parameter MAY be omitted for properties using the default value type. The VALUE parameter MUST be omitted for properties that have the jCal type identifier "unknown".

转换为iCalendar时,必须将VALUE参数添加到默认值类型未知但没有jCal类型标识符“未知”的属性中。对于使用默认值类型的属性,可以省略VALUE参数。对于jCal类型标识符为“未知”的属性,必须省略VALUE参数。

5. Handling Unrecognized Properties or Parameters
5. 处理无法识别的属性或参数

In iCalendar, properties can have one or more value types as specified by their definition, with one of those values being defined as the default. When a property uses its default value type, the "VALUE" property parameter does not need to be specified on the property. For example, the default value type for "DTSTART" is "DATE-TIME", so "VALUE=DATE-TIME" need not be set as a property parameter. However, "DTSTART" also allows a "DATE" value to be specified, and if that is used, "VALUE=DATE" has to be set as a property parameter.

在iCalendar中,属性可以具有由其定义指定的一个或多个值类型,其中一个值被定义为默认值。当属性使用其默认值类型时,不需要在属性上指定“value”属性参数。例如,“DTSTART”的默认值类型是“DATE-TIME”,因此“value=DATE-TIME”不需要设置为属性参数。但是,“DTSTART”还允许指定“DATE”值,如果使用该值,“value=DATE”必须设置为属性参数。

When new properties are defined or "X-" properties used, an iCalendar to jCal converter might not recognize them, and not know what the appropriate default value types are, yet they need to be able to preserve the values. A similar issue arises for unrecognized property parameters.

定义新属性或使用“X-”属性时,iCalendar-to-jCal转换器可能无法识别它们,也不知道适当的默认值类型是什么,但它们需要能够保留这些值。对于无法识别的属性参数,也会出现类似的问题。

In jCal, a new "unknown" property value type is introduced. Its purpose is to allow preserving unknown property values when round-tripping between jCal and iCalendar. To avoid collisions, this specification reserves the UNKNOWN property value type in iCalendar. It MUST NOT be used in any iCalendar as specified by [RFC5545], nor any extensions to it. Thus, the type is registered to the iCalendar Value Data Types registry in Section 7.1.

在jCal中,引入了一种新的“未知”属性值类型。其目的是允许在jCal和iCalendar之间往返时保留未知的属性值。为了避免冲突,此规范在iCalendar中保留未知的属性值类型。不得在[RFC5545]规定的任何iCalendar中使用,也不得在其任何扩展中使用。因此,该类型在第7.1节中注册到iCalendar值数据类型注册表。

5.1. Converting iCalendar into jCal
5.1. 将iCalendar转换为jCal

Any property that does not include a "VALUE" property parameter and whose default value type is not known, MUST be converted to a primitive JSON string. The content of that string is the unprocessed value text. Also, value type MUST be set to "unknown".

任何不包含“VALUE”属性参数且默认值类型未知的属性都必须转换为基本JSON字符串。该字符串的内容是未处理的值文本。此外,值类型必须设置为“未知”。

To correctly implement this format, it is critical that the type "unknown" be used if the default type is not known. If this requirement is ignored and, for example, "text" is used, additional escaping may occur, which breaks round-tripping values.

要正确实现此格式,如果默认类型未知,则必须使用“未知”类型。如果忽略此要求,例如使用“文本”,则可能会发生额外的转义,从而中断往返值。

Any unrecognized property parameter MUST be converted to a string value, with its content set to the property parameter value text, and treated as if it were a "TEXT" value.

任何无法识别的属性参数都必须转换为字符串值,其内容设置为属性参数值text,并将其视为“text”值。

5.2. Converting jCal into iCalendar
5.2. 将jCal转换为iCalendar

In jCal, the value type is always explicitly specified. It is converted to iCalendar using the iCalendar VALUE parameter, except in the following two cases:

在jCal中,始终显式指定值类型。使用iCalendar值参数将其转换为iCalendar,以下两种情况除外:

o If the value type specified in jCal matches the default value type in iCalendar, the VALUE parameter MAY be omitted.

o 如果jCal中指定的值类型与iCalendar中的默认值类型匹配,则可以省略value参数。

o If the value type specified in jCal is set to "unknown", the VALUE parameter MUST NOT be specified. The value MUST be taken over in iCalendar without processing.

o 如果jCal中指定的值类型设置为“未知”,则不能指定值参数。必须在iCalendar中接收该值,而不进行处理。

5.3. Examples
5.3. 例子

The following is an example of an unrecognized iCalendar property (that uses a "DATE-TIME" value as its default), and the equivalent jCal representation of that property.

以下是无法识别的iCalendar属性(使用“日期-时间”值作为其默认值)的示例,以及该属性的等效jCal表示形式。

iCalendar:

伊卡伦达:

X-COMPLAINT-DEADLINE:20110512T120000Z

X-投诉-截止日期:20110512T120000Z

jCal:

jCal:

["x-complaint-deadline", {}, "unknown", "20110512T120000Z"]

[“x-complaint-deadline”,{},“未知”,“20110512T120000Z”]

The following is an example of how to cope with jCal data where the parser was unable to identify the type. Note how the "unknown" value type is not added to the iCalendar data and escaping, aside from standard JSON string escaping, is not processed.

下面是一个示例,说明如何处理解析器无法识别类型的jCal数据。请注意,“未知”值类型如何不会添加到iCalendar数据中,并且除了标准JSON字符串转义之外,转义也不会被处理。

jCal:

jCal:

   ["x-coffee-data", {}, "unknown", "Stenophylla;Guinea\\,Africa"]
        
   ["x-coffee-data", {}, "unknown", "Stenophylla;Guinea\\,Africa"]
        

iCalendar:

伊卡伦达:

X-COFFEE-DATA:Stenophylla;Guinea\,Africa

X-咖啡-数据:狭叶藻;几内亚\非洲

The following is an example of a jCal property (where the corresponding iCalendar property uses an "INTEGER" value as its default) and the equivalent iCalendar representation of that property.

以下是jCal属性(其中相应的iCalendar属性使用“整型”值作为其默认值)和该属性的等效iCalendar表示形式的示例。

jCal:

jCal:

["percent-complete", {}, "integer", 95]

[“完成百分比”{},“整数”,95]

iCalendar:

伊卡伦达:

PERCENT-COMPLETE:95

完成百分比:95

The following is an example of an unrecognized iCalendar property parameter (that uses a "FLOAT" value as its default) specified on a recognized iCalendar property and the equivalent jCal representation of that property and property parameter.

以下是在已识别iCalendar属性上指定的未识别iCalendar属性参数(使用“FLOAT”值作为其默认值)示例,以及该属性和属性参数的等效jCal表示形式。

iCalendar:

伊卡伦达:

   DTSTART;X-SLACK=30.3;VALUE=DATE:20110512
        
   DTSTART;X-SLACK=30.3;VALUE=DATE:20110512
        

jCal:

jCal:

   ["dtstart", { "x-slack": "30.3" }, "date", "2011-05-12"]
        
   ["dtstart", { "x-slack": "30.3" }, "date", "2011-05-12"]
        
6. Security Considerations
6. 安全考虑

This specification defines how iCalendar data can be "translated" between two different data formats -- the original text format and JSON -- with a one-to-one mapping to ensure all the semantic data in one format (properties, parameters, and values) are preserved in the other. It does not change the semantic meaning of the underlying data itself, or impose or remove any security considerations that apply to the underlying data.

本规范定义了如何在两种不同的数据格式(原始文本格式和JSON)之间“转换”iCalendar数据,并通过一对一的映射确保一种格式(属性、参数和值)中的所有语义数据保留在另一种格式中。它不会更改基础数据本身的语义,也不会强加或删除适用于基础数据的任何安全注意事项。

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.

如[RFC7159]第12节所述,使用JSON作为格式确实有其固有的安全风险。尽管JSON被认为是JavaScript的一个安全子集,但应该记住,处理JSON的解析器中的一个缺陷仍然可能带来威胁,这在传统iCalendar数据中是不会出现的。

With this in mind, a parser for JSON data should be used for jCal that is aware of the security implications. 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.

考虑到这一点,jCal应该使用JSON数据解析器,以了解安全含义。例如,使用JavaScript的eval()函数被认为是不可接受的安全风险,如[RFC7159]第12节所述。最好使用完全了解JSON格式的本机解析器。

In addition, it is expected that this new format will result in iCalendar data being more widely disseminated (e.g., with use in web applications rather than just dedicated calendaring applications).

此外,预计这种新格式将使iCalendar数据得到更广泛的传播(例如,在web应用程序中使用,而不仅仅是专用日历应用程序)。

In all cases, application developers have to conform to the semantics of the iCalendar data as defined by [RFC5545] and associated extensions, and all of the security considerations described in Section 7 of [RFC5545], or any associated extensions, are applicable.

在所有情况下,应用程序开发人员都必须遵守[RFC5545]和相关扩展定义的iCalendar数据语义,并且[RFC5545]第7节或任何相关扩展中描述的所有安全注意事项都适用。

7. IANA Considerations
7. IANA考虑

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.

本文档定义了用于JSON数据中iCalendar的MIME媒体类型。此媒体类型应用于传输JSON中的日历数据。

Type name: application

类型名称:应用程序

Subtype name: calendar+json

子类型名称:calendar+json

Required parameters: none

所需参数:无

Optional parameters: "method", "component", and "optinfo" as defined for the text/calendar media type in [RFC5545], Section 8.1.

可选参数:[RFC5545]第8.1节中为文本/日历媒体类型定义的“方法”、“组件”和“optinfo”。

Encoding considerations: Same as encoding considerations of application/json as specified in [RFC7159], Section 11.

编码注意事项:与[RFC7159]第11节中指定的应用程序/json的编码注意事项相同。

Security considerations: See Section 6.

安全注意事项:见第6节。

Interoperability considerations: This media type provides an alternative format for iCalendar data based on JSON.

互操作性注意事项:这种媒体类型为基于JSON的iCalendar数据提供了另一种格式。

Published specification: This specification.

已发布规范:本规范。

Applications that use this media type: Applications that currently make use of the text/calendar media type can use this as an alternative. Similarly, applications that use the application/ json media type to transfer calendaring data can use this to further specify the content.

使用此媒体类型的应用程序:当前使用文本/日历媒体类型的应用程序可以使用此作为替代。类似地,使用application/json媒体类型传输日历数据的应用程序可以使用它来进一步指定内容。

Fragment identifier considerations: N/A

片段标识符注意事项:不适用

Additional information:

其他信息:

Deprecated alias names for this type: N/A

此类型的已弃用别名:不适用

      Magic number(s):  N/A
        
      Magic number(s):  N/A
        
      File extension(s):  N/A
        
      File extension(s):  N/A
        
      Macintosh file type code(s):  N/A
        
      Macintosh file type code(s):  N/A
        

Person & email address to contact for further information: calsify@ietf.org

联系人和电子邮件地址,以获取更多信息:calsify@ietf.org

Intended usage: COMMON

预期用途:普通

Restrictions on usage: There are no restrictions on where this media type can be used.

使用限制:此媒体类型的使用位置没有限制。

Author: See the "Authors' Addresses" section of this document.

作者:请参阅本文件的“作者地址”部分。

Change controller: IETF

更改控制器:IETF

7.1. UNKNOWN iCalendar Value Data Type
7.1. 未知的iCalendar值数据类型

IANA has added the following entry to the iCalendar Data Types registry:

IANA已将以下条目添加到iCalendar数据类型注册表:

Value name: UNKNOWN

值名称:未知

Purpose: To allow preserving property values whose default value type is not known during round-tripping between jCal and iCalendar.

目的:允许在jCal和iCalendar之间的往返过程中保留默认值类型未知的属性值。

Format definition: N/A

格式定义:不适用

Description: The UNKNOWN value data type is reserved for the exclusive use of the jCal format. Its use is described in Section 5 of this document.

描述:未知值数据类型保留为jCal格式的专用。本文件第5节对其使用进行了说明。

Example: As this registration serves as a reservation of the UNKNOWN type so that it is not used in iCalendar, there is no applicable iCalendar example. Examples of its usage in jCal can be found in this document.

示例:由于此注册用作未知类型的保留,因此不在iCalendar中使用,因此没有适用的iCalendar示例。在本文档中可以找到它在jCal中的使用示例。

IANA has made the "Status" column for this entry in the registry say, "Reserved - Do not use" and has made the "Reference" column refer to Section 5 of this document.

IANA在注册表中为该条目设置了“状态”栏,即“保留-请勿使用”,并将“参考”栏设置为本文件第5节。

8. Acknowledgments
8. 致谢

The authors would like to thank the following for their valuable contributions: William Gill, Erwin Rehme, Dave Thewlis, Simon Perreault, Michael Angstadt, Peter Saint-Andre, Bert Greevenbosch, and Javier Godoy. This specification originated from the work of the XML-JSON technical committee of the Calendaring and Scheduling Consortium.

作者要感谢以下人士的宝贵贡献:威廉·吉尔、欧文·雷姆、戴夫·泰利斯、西蒙·佩雷尔特、迈克尔·安斯塔特、彼得·圣安德烈、伯特·格里文博什和哈维尔·戈多伊。本规范源于日历和调度联盟XML-JSON技术委员会的工作。

9. References
9. 工具书类
9.1. Normative References
9.1. 规范性引用文件

[ISO.8601.2004] International Organization for Standardization, "Data elements and interchange formats -- Information interchange -- Representation of dates and times", ISO 8601, December 2004, <http://www.iso.org/iso/catalogue_detail?csnumber=40874>.

[ISO.8601.2004]国际标准化组织,“数据元素和交换格式——信息交换——日期和时间的表示”,ISO 86012004年12月<http://www.iso.org/iso/catalogue_detail?csnumber=40874>.

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005.

[RFC3986]Berners Lee,T.,Fielding,R.,和L.Masinter,“统一资源标识符(URI):通用语法”,STD 66,RFC 3986,2005年1月。

[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, October 2006.

[RFC4648]Josefsson,S.,“Base16、Base32和Base64数据编码”,RFC4648,2006年10月。

[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008.

[RFC5234]Crocker,D.和P.Overell,“语法规范的扩充BNF:ABNF”,STD 68,RFC 5234,2008年1月。

[RFC5545] Desruisseaux, B., "Internet Calendaring and Scheduling Core Object Specification (iCalendar)", RFC 5545, September 2009.

[RFC5545]Desruisseaux,B.“互联网日历和调度核心对象规范(iCalendar)”,RFC 55452009年9月。

[RFC6321] Daboo, C., Douglass, M., and S. Lees, "xCal: The XML Format for iCalendar", RFC 6321, August 2011.

[RFC6321]Daboo,C.,Douglass,M.,和S.Lees,“xCal:iCalendar的XML格式”,RFC 63212011年8月。

[RFC6868] Daboo, C., "Parameter Value Encoding in iCalendar and vCard", RFC 6868, February 2013.

[RFC6868]Daboo,C.,“iCalendar和vCard中的参数值编码”,RFC 6868,2013年2月。

[RFC7159] Bray, T., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 7159, March 2014.

[RFC7159]Bray,T.,“JavaScript对象表示法(JSON)数据交换格式”,RFC 7159,2014年3月。

9.2. Informative References
9.2. 资料性引用

[calconnect-artifacts] The Calendaring and Scheduling Consortium, "Code Artifacts and Schemas", <http://www.calconnect.org/artifacts.shtml>.

[calconnect artifacts]日历和调度联盟,“代码工件和模式”<http://www.calconnect.org/artifacts.shtml>.

Appendix A. ABNF Schema
附录A.ABNF模式

Below is an ABNF schema as per [RFC5234] for iCalendar in JSON. ABNF symbols not described here are taken from [RFC7159]. The schema is non-normative and given for reference only.

下面是一个符合[RFC5234]的ABNF模式,用于JSON中的iCalendar。此处未描述的ABNF符号取自[RFC7159]。该模式不规范,仅供参考。

Additional semantic restrictions apply, especially regarding the allowed properties and sub-components per component. Details on these restrictions can be found in this document and [RFC5545].

附加语义限制适用,特别是关于每个组件允许的属性和子组件。有关这些限制的详细信息,请参见本文件和[RFC5545]。

Additional schemas may be available on the Internet at [calconnect-artifacts].

其他模式可在互联网[calconnect artifacts]上获得。

   ; A jCal object is a component with the component-name "vcalendar".
   ; Restrictions to which properties and sub-components may be
   ; specified are to be taken from [RFC5545].
   jcalobject = component
        
   ; A jCal object is a component with the component-name "vcalendar".
   ; Restrictions to which properties and sub-components may be
   ; specified are to be taken from [RFC5545].
   jcalobject = component
        

; A jCal component consists of the name string, properties array, and ; component array component = begin-array DQUOTE component-name DQUOTE value-separator properties-array value-separator components-array end-array

; jCal组件由名称字符串、属性数组和;组件数组组件=开始数组DQUOTE组件名称DQUOTE值分隔符属性数组值分隔符组件数组结束数组

components-array = begin-array [ component *(value-separator component) ] end-array

组件数组=开始数组[组件*(值分隔符组件)]结束数组

; A jCal property consists of the name string, parameters object, ; type string, and one or more values as specified in this document. property = begin-array DQUOTE property-name DQUOTE value-separator params-object value-separator DQUOTE type-name DQUOTE property-value *(value-separator property-value) end-array properties-array = begin-array [ property *(value-separator property) ] end-array

; jCal属性由名称字符串、参数对象、;键入字符串和本文档中指定的一个或多个值。属性=开始数组DQUOTE属性名称DQUOTE值分隔符参数对象值分隔符DQUOTE类型名称DQUOTE属性值*(值分隔符属性值)结束数组属性数组=开始数组[属性*(值分隔符属性)]结束数组

   ; Property values depend on the type-name. Aside from the value types
   ; mentioned here, extensions may make use of other JSON value types.
   ; The non-terminal symbol structured-prop-value covers the special
   ; cases for GEO and REQUEST-STATUS.
   property-value = simple-prop-value / structured-prop-value
   simple-prop-value = string / number / true / false
        
   ; Property values depend on the type-name. Aside from the value types
   ; mentioned here, extensions may make use of other JSON value types.
   ; The non-terminal symbol structured-prop-value covers the special
   ; cases for GEO and REQUEST-STATUS.
   property-value = simple-prop-value / structured-prop-value
   simple-prop-value = string / number / true / false
        

structured-prop-value = begin-array [ structured-element *(value-separator structured-element) ] end-array structured-element = simple-prop-value

结构化属性值=开始数组[结构化元素*(值分隔符结构化元素)]结束数组结构化元素=简单属性值

; The jCal params-object is a JSON object that follows the semantic ; guidelines described in this document. params-object = begin-object [ params-member *(value-separator params-member) ] end-object params-member = DQUOTE param-name DQUOTE name-separator param-value param-value = string / param-multi param-multi = begin-array [ string *(value-separator string) ] end-array

; jCal params对象是遵循语义的JSON对象;本文件中描述的指南。params object=begin object[params member*(值分隔符params member)]end object params member=DQUOTE参数名称DQUOTE名称分隔符param value param value=string/param multi=begin数组[string*(值分隔符string)]end数组

   ; The type MUST be a valid type as described by this document. New
   ; value types can be added by extensions.
   type-name = "binary" / "boolean" / "cal-address" / "date" /
               "date-time" / "duration" / "float" / "integer" /
               "period" / "recur" / "text" / "time" / "uri" /
               "utc-offset" / x-type
        
   ; The type MUST be a valid type as described by this document. New
   ; value types can be added by extensions.
   type-name = "binary" / "boolean" / "cal-address" / "date" /
               "date-time" / "duration" / "float" / "integer" /
               "period" / "recur" / "text" / "time" / "uri" /
               "utc-offset" / x-type
        
   ; Component, property, parameter, and type names MUST be lowercase.
   ; Additional semantic restrictions apply as described by this
   ; document and [RFC5545].
   component-name = lowercase-name
   property-name = lowercase-name
   param-name = lowercase-name
   x-type = lowercase-name
   lowercase-name = 1*(%x61-7A / DIGIT / "-")
        
   ; Component, property, parameter, and type names MUST be lowercase.
   ; Additional semantic restrictions apply as described by this
   ; document and [RFC5545].
   component-name = lowercase-name
   property-name = lowercase-name
   param-name = lowercase-name
   x-type = lowercase-name
   lowercase-name = 1*(%x61-7A / DIGIT / "-")
        
   ; The following rules are defined in [RFC7159], as mentioned above:
   ;   begin-array / end-array
   ;   begin-object / end-object
   ;   name-separator / value-separator
   ;   string / number / true / false
        
   ; The following rules are defined in [RFC7159], as mentioned above:
   ;   begin-array / end-array
   ;   begin-object / end-object
   ;   name-separator / value-separator
   ;   string / number / true / false
        
Appendix B. Examples
附录B.示例

This section contains two examples of iCalendar objects with their jCal representation.

本节包含两个iCalendar对象及其jCal表示的示例。

B.1. Example 1
B.1. 例1
B.1.1. iCalendar Data
B.1.1. iCalendar数据
   BEGIN:VCALENDAR
   CALSCALE:GREGORIAN
   PRODID:-//Example Inc.//Example Calendar//EN
   VERSION:2.0
   BEGIN:VEVENT
   DTSTAMP:20080205T191224Z
   DTSTART:20081006
   SUMMARY:Planning meeting
   UID:4088E990AD89CB3DBB484909
   END:VEVENT
   END:VCALENDAR
        
   BEGIN:VCALENDAR
   CALSCALE:GREGORIAN
   PRODID:-//Example Inc.//Example Calendar//EN
   VERSION:2.0
   BEGIN:VEVENT
   DTSTAMP:20080205T191224Z
   DTSTART:20081006
   SUMMARY:Planning meeting
   UID:4088E990AD89CB3DBB484909
   END:VEVENT
   END:VCALENDAR
        
B.1.2. jCal Data
B.1.2. jCal数据
   ["vcalendar",
     [
       ["calscale", {}, "text", "GREGORIAN"],
       ["prodid", {}, "text", "-//Example Inc.//Example Calendar//EN"],
       ["version", {}, "text", "2.0"]
     ],
     [
       ["vevent",
         [
           ["dtstamp", {}, "date-time", "2008-02-05T19:12:24Z"],
           ["dtstart", {}, "date", "2008-10-06"],
           ["summary", {}, "text", "Planning meeting"],
           ["uid", {}, "text", "4088E990AD89CB3DBB484909"]
         ],
         []
       ]
     ]
   ]
        
   ["vcalendar",
     [
       ["calscale", {}, "text", "GREGORIAN"],
       ["prodid", {}, "text", "-//Example Inc.//Example Calendar//EN"],
       ["version", {}, "text", "2.0"]
     ],
     [
       ["vevent",
         [
           ["dtstamp", {}, "date-time", "2008-02-05T19:12:24Z"],
           ["dtstart", {}, "date", "2008-10-06"],
           ["summary", {}, "text", "Planning meeting"],
           ["uid", {}, "text", "4088E990AD89CB3DBB484909"]
         ],
         []
       ]
     ]
   ]
        
B.2. Example 2
B.2. 例2
B.2.1. iCalendar Data
B.2.1. iCalendar数据
   BEGIN:VCALENDAR
   VERSION:2.0
   PRODID:-//Example Corp.//Example Client//EN
   BEGIN:VTIMEZONE
   LAST-MODIFIED:20040110T032845Z
   TZID:US/Eastern
   BEGIN:DAYLIGHT
   DTSTART:20000404T020000
   RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
   TZNAME:EDT
   TZOFFSETFROM:-0500
   TZOFFSETTO:-0400
   END:DAYLIGHT
   BEGIN:STANDARD
   DTSTART:20001026T020000
   RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
   TZNAME:EST
   TZOFFSETFROM:-0400
   TZOFFSETTO:-0500
   END:STANDARD
   END:VTIMEZONE
   BEGIN:VEVENT
   DTSTAMP:20060206T001121Z
   DTSTART;TZID=US/Eastern:20060102T120000
   DURATION:PT1H
   RRULE:FREQ=DAILY;COUNT=5
   RDATE;TZID=US/Eastern;VALUE=PERIOD:20060102T150000/PT2H
   SUMMARY:Event #2
   DESCRIPTION:We are having a meeting all this week at 12 pm fo
    r one hour\, with an additional meeting on the first day 2 h
    ours long.\nPlease bring your own lunch for the 12 pm meetin
    gs.
   UID:00959BC664CA650E933C892C@example.com
   END:VEVENT
   BEGIN:VEVENT
   DTSTAMP:20060206T001121Z
   DTSTART;TZID=US/Eastern:20060104T140000
   DURATION:PT1H
   RECURRENCE-ID;TZID=US/Eastern:20060104T120000
   SUMMARY:Event #2 bis
   UID:00959BC664CA650E933C892C@example.com
   END:VEVENT
   END:VCALENDAR
        
   BEGIN:VCALENDAR
   VERSION:2.0
   PRODID:-//Example Corp.//Example Client//EN
   BEGIN:VTIMEZONE
   LAST-MODIFIED:20040110T032845Z
   TZID:US/Eastern
   BEGIN:DAYLIGHT
   DTSTART:20000404T020000
   RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
   TZNAME:EDT
   TZOFFSETFROM:-0500
   TZOFFSETTO:-0400
   END:DAYLIGHT
   BEGIN:STANDARD
   DTSTART:20001026T020000
   RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
   TZNAME:EST
   TZOFFSETFROM:-0400
   TZOFFSETTO:-0500
   END:STANDARD
   END:VTIMEZONE
   BEGIN:VEVENT
   DTSTAMP:20060206T001121Z
   DTSTART;TZID=US/Eastern:20060102T120000
   DURATION:PT1H
   RRULE:FREQ=DAILY;COUNT=5
   RDATE;TZID=US/Eastern;VALUE=PERIOD:20060102T150000/PT2H
   SUMMARY:Event #2
   DESCRIPTION:We are having a meeting all this week at 12 pm fo
    r one hour\, with an additional meeting on the first day 2 h
    ours long.\nPlease bring your own lunch for the 12 pm meetin
    gs.
   UID:00959BC664CA650E933C892C@example.com
   END:VEVENT
   BEGIN:VEVENT
   DTSTAMP:20060206T001121Z
   DTSTART;TZID=US/Eastern:20060104T140000
   DURATION:PT1H
   RECURRENCE-ID;TZID=US/Eastern:20060104T120000
   SUMMARY:Event #2 bis
   UID:00959BC664CA650E933C892C@example.com
   END:VEVENT
   END:VCALENDAR
        
B.2.2. jCal Data
B.2.2. jCal数据
   ["vcalendar",
     [
       ["prodid", {}, "text", "-//Example Corp.//Example Client//EN"],
       ["version", {}, "text", "2.0"]
     ],
     [
       ["vtimezone",
         [
           ["last-modified", {}, "date-time", "2004-01-10T03:28:45Z"],
           ["tzid", {}, "text", "US/Eastern"]
         ],
         [
           ["daylight",
             [
               ["dtstart", {}, "date-time", "2000-04-04T02:00:00"],
               ["rrule",
                 {},
                 "recur",
                 {
                   "freq": "YEARLY",
                   "byday": "1SU",
                   "bymonth": 4
                 }
               ],
               ["tzname", {}, "text", "EDT"],
               ["tzoffsetfrom", {}, "utc-offset", "-05:00"],
               ["tzoffsetto", {}, "utc-offset", "-04:00"]
             ],
             []
           ],
           ["standard",
             [
               ["dtstart", {}, "date-time", "2000-10-26T02:00:00"],
               ["rrule",
                 {},
                 "recur",
                 {
                   "freq": "YEARLY",
                   "byday": "1SU",
                   "bymonth": 10
                 }
               ],
               ["tzname", {}, "text", "EST"],
               ["tzoffsetfrom", {}, "utc-offset", "-04:00"],
               ["tzoffsetto", {}, "utc-offset", "-05:00"]
             ],
        
   ["vcalendar",
     [
       ["prodid", {}, "text", "-//Example Corp.//Example Client//EN"],
       ["version", {}, "text", "2.0"]
     ],
     [
       ["vtimezone",
         [
           ["last-modified", {}, "date-time", "2004-01-10T03:28:45Z"],
           ["tzid", {}, "text", "US/Eastern"]
         ],
         [
           ["daylight",
             [
               ["dtstart", {}, "date-time", "2000-04-04T02:00:00"],
               ["rrule",
                 {},
                 "recur",
                 {
                   "freq": "YEARLY",
                   "byday": "1SU",
                   "bymonth": 4
                 }
               ],
               ["tzname", {}, "text", "EDT"],
               ["tzoffsetfrom", {}, "utc-offset", "-05:00"],
               ["tzoffsetto", {}, "utc-offset", "-04:00"]
             ],
             []
           ],
           ["standard",
             [
               ["dtstart", {}, "date-time", "2000-10-26T02:00:00"],
               ["rrule",
                 {},
                 "recur",
                 {
                   "freq": "YEARLY",
                   "byday": "1SU",
                   "bymonth": 10
                 }
               ],
               ["tzname", {}, "text", "EST"],
               ["tzoffsetfrom", {}, "utc-offset", "-04:00"],
               ["tzoffsetto", {}, "utc-offset", "-05:00"]
             ],
        
             []
           ]
         ]
       ],
       ["vevent",
         [
           ["dtstamp", {}, "date-time", "2006-02-06T00:11:21Z"],
           ["dtstart",
             { "tzid": "US/Eastern" },
             "date-time",
             "2006-01-02T12:00:00"
           ],
           ["duration", {}, "duration", "PT1H"],
           ["rrule", {}, "recur", { "freq": "DAILY", "count": 5 } ],
           ["rdate",
             { "tzid": "US/Eastern" },
             "period",
             "2006-01-02T15:00:00/PT2H"
           ],
           ["summary", {}, "text", "Event #2"],
           ["description",
            {},
            "text",
            // Note that comments and string concatenation are not
            // allowed per the JSON specification and is used here only
            // to avoid long lines.
            "We are having a meeting all this week at 12 pm for one " +
            "hour, with an additional meeting on the first day 2 " +
            "hours long.\nPlease bring your own lunch for the 12 pm " +
            "meetings."
           ],
           ["uid", {}, "text", "00959BC664CA650E933C892C@example.com"]
         ],
         []
       ],
       ["vevent",
         [
           ["dtstamp", {}, "date-time", "2006-02-06T00:11:21Z"],
           ["dtstart",
             { "tzid": "US/Eastern" },
             "date-time",
             "2006-01-02T14:00:00"
           ],
           ["duration", {}, "duration", "PT1H"],
           ["recurrence-id",
             { "tzid": "US/Eastern" },
             "date-time",
             "2006-01-04T12:00:00"
        
             []
           ]
         ]
       ],
       ["vevent",
         [
           ["dtstamp", {}, "date-time", "2006-02-06T00:11:21Z"],
           ["dtstart",
             { "tzid": "US/Eastern" },
             "date-time",
             "2006-01-02T12:00:00"
           ],
           ["duration", {}, "duration", "PT1H"],
           ["rrule", {}, "recur", { "freq": "DAILY", "count": 5 } ],
           ["rdate",
             { "tzid": "US/Eastern" },
             "period",
             "2006-01-02T15:00:00/PT2H"
           ],
           ["summary", {}, "text", "Event #2"],
           ["description",
            {},
            "text",
            // Note that comments and string concatenation are not
            // allowed per the JSON specification and is used here only
            // to avoid long lines.
            "We are having a meeting all this week at 12 pm for one " +
            "hour, with an additional meeting on the first day 2 " +
            "hours long.\nPlease bring your own lunch for the 12 pm " +
            "meetings."
           ],
           ["uid", {}, "text", "00959BC664CA650E933C892C@example.com"]
         ],
         []
       ],
       ["vevent",
         [
           ["dtstamp", {}, "date-time", "2006-02-06T00:11:21Z"],
           ["dtstart",
             { "tzid": "US/Eastern" },
             "date-time",
             "2006-01-02T14:00:00"
           ],
           ["duration", {}, "duration", "PT1H"],
           ["recurrence-id",
             { "tzid": "US/Eastern" },
             "date-time",
             "2006-01-04T12:00:00"
        
           ],
           ["summary", {}, "text", "Event #2"],
           ["uid", {}, "text", "00959BC664CA650E933C892C@example.com"]
         ],
         []
       ]
     ]
   ]
        
           ],
           ["summary", {}, "text", "Event #2"],
           ["uid", {}, "text", "00959BC664CA650E933C892C@example.com"]
         ],
         []
       ]
     ]
   ]
        

Authors' Addresses

作者地址

Philipp Kewisch Mozilla Corporation 650 Castro Street, Suite 300 Mountain View, CA 94041 USA

美国加利福尼亚州山景城卡斯特罗街650号300室Philipp Kewisch Mozilla Corporation 94041

   EMail: mozilla@kewis.ch
   URI:   http://www.mozilla.org/
        
   EMail: mozilla@kewis.ch
   URI:   http://www.mozilla.org/
        

Cyrus Daboo Apple Inc. 1 Infinite Loop Cupertino, CA 95014 USA

Cyrus Daboo苹果公司,美国加利福尼亚州库珀蒂诺市无限环路1号,邮编95014

   EMail: cyrus@daboo.name
   URI:   http://www.apple.com/
        
   EMail: cyrus@daboo.name
   URI:   http://www.apple.com/
        

Mike Douglass Rensselaer Polytechnic Institute 110 8th Street Troy, NY 12180 USA

迈克·道格拉斯·伦斯勒理工学院,美国纽约州特洛伊市第八街110号,邮编:12180

   EMail: douglm@rpi.edu
   URI:   http://www.rpi.edu/
        
   EMail: douglm@rpi.edu
   URI:   http://www.rpi.edu/