--- 1/draft-ietf-jmap-jscontact-07.txt 2021-10-20 03:13:07.128343674 -0700 +++ 2/draft-ietf-jmap-jscontact-08.txt 2021-10-20 03:13:07.172344230 -0700 @@ -1,19 +1,19 @@ JMAP R. Stepanek Internet-Draft FastMail Intended status: Standards Track M. Loffredo -Expires: 13 January 2022 IIT-CNR - 12 July 2021 +Expires: 23 April 2022 IIT-CNR + 20 October 2021 JSContact: A JSON representation of contact data - draft-ietf-jmap-jscontact-07 + draft-ietf-jmap-jscontact-08 Abstract This specification defines a data model and JSON representation of contact card information that can be used for data storage and exchange in address book or directory applications. It aims to be an alternative to the vCard data format and to be unambiguous, extendable and simple to process. In contrast to the JSON-based jCard format, it is not a direct mapping from the vCard data model and expands semantics where appropriate. @@ -26,21 +26,21 @@ Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." - This Internet-Draft will expire on 13 January 2022. + This Internet-Draft will expire on 23 April 2022. Copyright Notice Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights @@ -51,67 +51,72 @@ Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Relation to the xCard and jCard formats . . . . . . . . . 4 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.3. Vendor-specific Property Extensions and Values . . . . . 4 1.4. Type Signatures . . . . . . . . . . . . . . . . . . . . . 4 1.5. Data types . . . . . . . . . . . . . . . . . . . . . . . 5 1.5.1. Context . . . . . . . . . . . . . . . . . . . . . . . 5 - 1.5.2. Id . . . . . . . . . . . . . . . . . . . . . . . . . 5 - 1.5.3. LocalizedString . . . . . . . . . . . . . . . . . . . 6 - 1.5.4. Preference . . . . . . . . . . . . . . . . . . . . . 6 + 1.5.2. Id . . . . . . . . . . . . . . . . . . . . . . . . . 6 + 1.5.3. PatchObject . . . . . . . . . . . . . . . . . . . . . 6 + 1.5.4. Preference . . . . . . . . . . . . . . . . . . . . . 7 1.5.5. UTCDateTime . . . . . . . . . . . . . . . . . . . . . 7 - 2. Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 2.1. Metadata properties . . . . . . . . . . . . . . . . . . . 7 - 2.1.1. uid . . . . . . . . . . . . . . . . . . . . . . . . . 7 - 2.1.2. prodId . . . . . . . . . . . . . . . . . . . . . . . 7 - 2.1.3. created . . . . . . . . . . . . . . . . . . . . . . . 7 - 2.1.4. updated . . . . . . . . . . . . . . . . . . . . . . . 8 - 2.1.5. kind . . . . . . . . . . . . . . . . . . . . . . . . 8 - 2.1.6. relatedTo . . . . . . . . . . . . . . . . . . . . . . 8 - 2.2. Name and Organization properties . . . . . . . . . . . . 9 - 2.2.1. name . . . . . . . . . . . . . . . . . . . . . . . . 9 - 2.2.2. fullName . . . . . . . . . . . . . . . . . . . . . . 9 - 2.2.3. nickNames . . . . . . . . . . . . . . . . . . . . . . 10 - 2.2.4. organizations . . . . . . . . . . . . . . . . . . . . 10 - 2.2.5. titles . . . . . . . . . . . . . . . . . . . . . . . 10 - 2.3. Contact and Resource properties . . . . . . . . . . . . . 10 - 2.3.1. emails . . . . . . . . . . . . . . . . . . . . . . . 10 - 2.3.2. phones . . . . . . . . . . . . . . . . . . . . . . . 11 - 2.3.3. online . . . . . . . . . . . . . . . . . . . . . . . 12 - 2.3.4. photos . . . . . . . . . . . . . . . . . . . . . . . 13 - 2.3.5. preferredContactMethod . . . . . . . . . . . . . . . 13 - 2.3.6. preferredContactLanguages . . . . . . . . . . . . . . 14 - 2.4. Address and Location properties . . . . . . . . . . . . . 14 - 2.4.1. addresses . . . . . . . . . . . . . . . . . . . . . . 14 - 2.5. Additional properties . . . . . . . . . . . . . . . . . . 16 - 2.5.1. anniversaries . . . . . . . . . . . . . . . . . . . . 16 - 2.5.2. personalInfo . . . . . . . . . . . . . . . . . . . . 17 - 2.5.3. notes . . . . . . . . . . . . . . . . . . . . . . . . 17 - 2.5.4. categories . . . . . . . . . . . . . . . . . . . . . 17 - 2.5.5. timeZones . . . . . . . . . . . . . . . . . . . . . . 17 - 3. CardGroup . . . . . . . . . . . . . . . . . . . . . . . . . . 18 - 3.1. Group properties . . . . . . . . . . . . . . . . . . . . 18 - 3.1.1. uid . . . . . . . . . . . . . . . . . . . . . . . . . 18 - 3.1.2. members . . . . . . . . . . . . . . . . . . . . . . . 18 - 3.1.3. name . . . . . . . . . . . . . . . . . . . . . . . . 18 - 3.1.4. card . . . . . . . . . . . . . . . . . . . . . . . . 18 - 4. Implementation Status . . . . . . . . . . . . . . . . . . . . 18 - 4.1. IIT-CNR/Registro.it . . . . . . . . . . . . . . . . . . . 19 - 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 19 - 6. Security Considerations . . . . . . . . . . . . . . . . . . . 19 - 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 19 - 7.1. Normative References . . . . . . . . . . . . . . . . . . 19 - 7.2. Informative References . . . . . . . . . . . . . . . . . 21 - Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 22 + 2. Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 + 2.1. Metadata properties . . . . . . . . . . . . . . . . . . . 8 + 2.1.1. @type . . . . . . . . . . . . . . . . . . . . . . . . 8 + 2.1.2. uid . . . . . . . . . . . . . . . . . . . . . . . . . 8 + 2.1.3. prodId . . . . . . . . . . . . . . . . . . . . . . . 8 + 2.1.4. created . . . . . . . . . . . . . . . . . . . . . . . 8 + 2.1.5. updated . . . . . . . . . . . . . . . . . . . . . . . 8 + 2.1.6. kind . . . . . . . . . . . . . . . . . . . . . . . . 9 + 2.1.7. relatedTo . . . . . . . . . . . . . . . . . . . . . . 9 + 2.1.8. language . . . . . . . . . . . . . . . . . . . . . . 9 + 2.2. Name and Organization properties . . . . . . . . . . . . 10 + 2.2.1. name . . . . . . . . . . . . . . . . . . . . . . . . 10 + 2.2.2. fullName . . . . . . . . . . . . . . . . . . . . . . 10 + 2.2.3. nickNames . . . . . . . . . . . . . . . . . . . . . . 11 + 2.2.4. organizations . . . . . . . . . . . . . . . . . . . . 11 + 2.2.5. titles . . . . . . . . . . . . . . . . . . . . . . . 11 + 2.3. Contact and Resource properties . . . . . . . . . . . . . 11 + 2.3.1. emails . . . . . . . . . . . . . . . . . . . . . . . 11 + 2.3.2. phones . . . . . . . . . . . . . . . . . . . . . . . 12 + 2.3.3. online . . . . . . . . . . . . . . . . . . . . . . . 13 + 2.3.4. photos . . . . . . . . . . . . . . . . . . . . . . . 14 + 2.3.5. preferredContactMethod . . . . . . . . . . . . . . . 15 + 2.3.6. preferredContactLanguages . . . . . . . . . . . . . . 15 + 2.4. Address and Location properties . . . . . . . . . . . . . 15 + 2.4.1. addresses . . . . . . . . . . . . . . . . . . . . . . 15 + 2.5. Multilingual properties . . . . . . . . . . . . . . . . . 17 + 2.5.1. localizations . . . . . . . . . . . . . . . . . . . . 17 + 2.6. Additional properties . . . . . . . . . . . . . . . . . . 18 + 2.6.1. anniversaries . . . . . . . . . . . . . . . . . . . . 18 + 2.6.2. personalInfo . . . . . . . . . . . . . . . . . . . . 19 + 2.6.3. notes . . . . . . . . . . . . . . . . . . . . . . . . 19 + 2.6.4. categories . . . . . . . . . . . . . . . . . . . . . 19 + 2.6.5. timeZones . . . . . . . . . . . . . . . . . . . . . . 20 + 3. CardGroup . . . . . . . . . . . . . . . . . . . . . . . . . . 20 + 3.1. Group properties . . . . . . . . . . . . . . . . . . . . 20 + 3.1.1. @type . . . . . . . . . . . . . . . . . . . . . . . . 20 + 3.1.2. uid . . . . . . . . . . . . . . . . . . . . . . . . . 20 + 3.1.3. members . . . . . . . . . . . . . . . . . . . . . . . 20 + 3.1.4. name . . . . . . . . . . . . . . . . . . . . . . . . 20 + 3.1.5. card . . . . . . . . . . . . . . . . . . . . . . . . 20 + 4. Implementation Status . . . . . . . . . . . . . . . . . . . . 21 + 4.1. IIT-CNR/Registro.it . . . . . . . . . . . . . . . . . . . 21 + 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 + 6. Security Considerations . . . . . . . . . . . . . . . . . . . 22 + 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 22 + 7.1. Normative References . . . . . . . . . . . . . . . . . . 22 + 7.2. Informative References . . . . . . . . . . . . . . . . . 23 + Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 24 1. Introduction This document defines a data model for contact card data normally used in address book or directory applications and services. It aims to be an alternative to the vCard data format [RFC6350] and to provide a JSON-based standard representation of contact card data. The key design considerations for this data model are as follows: @@ -150,682 +155,792 @@ 1.2. Terminology The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY, and OPTIONAL in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. 1.3. Vendor-specific Property Extensions and Values - Vendors MAY add additional properties to JSContact objects to support - their custom features. The names of these properties MUST be - prefixed with a domain name controlled by the vendor to avoid - conflict, e.g. "example.com/customprop". + Vendors MAY add additional properties to the contact object to + support their custom features. To avoid conflict, the names of these + properties MUST be prefixed by a domain name controlled by the vendor + followed by a colon, e.g., "example.com:customprop". If the value is + a new JSContact object, it either MUST include an "@type" property, + or it MUST explicitly be specified to not require a type designator. + The type name MUST be prefixed with a domain name controlled by the + vendor. - Some JSContact properties allow vendor-specific value extensions. If - so, vendor-specific values MUST be prefixed with a domain name - controlled by the vendor, e.g. "example.com/customrel". + Some JSContact properties allow vendor-specific value extensions. + Such vendor-specific values MUST be prefixed by a domain name + controlled by the vendor followed by a colon, e.g., + "example.com:customrel". Vendors are strongly encouraged to register any new property values or extensions that are useful to other systems as well, rather than - using a vendor-specific prefix. + use a vendor-specific prefix. 1.4. Type Signatures Type signatures are given for all JSON values in this document. The following conventions are used: - * "*" - The type is undefined (the value could be any type, although + * * - The type is undefined (the value could be any type, although permitted values may be constrained by the context of this value). - * "String" - The JSON string type. + * String - The JSON string type. - * "Number" - The JSON number type. + * Number - The JSON number type. - * "Boolean" - The JSON boolean type. + * Boolean - The JSON boolean type. - * "A[B]" - A JSON object where the keys are all of type "A", and the - values are all of type "B". + * A[B] - A JSON object where the keys are all of type A, and the + values are all of type B. - * "A[]" - An array of values of type "A". + * A[] - An array of values of type A. - * "A|B" - The value is either of type "A" or of type "B". + * A|B - The value is either of type A or of type B. 1.5. Data types In addition to the standard JSON data types, a couple of additional data types are common to the definitions of JSContact objects and properties. 1.5.1. Context Contact information typically is associated with a context in which it should be used. For example, someone might have distinct phone numbers for work and private contexts. The Context data type enumerates common contexts. Common context values are: - * "private": The contact information may be used to contact the card + * private: The contact information may be used to contact the card holder in a private context. - * "work": The contact information may be used to contact the card + * work: The contact information may be used to contact the card holder in a professional context. - * "other": The contact information may be used to contact the card + * other: The contact information may be used to contact the card holder in some other context. A label property MAY be defined to identify its purpose. Additional allowed values may be defined in the properties or data types that make use of the Context data type, registered in a future RFC, or a vendor-specific value. 1.5.2. Id - Where "Id" is given as a data type, it means a "String" of at least 1 - and a maximum of 255 octets in size, and it MUST only contain - characters from the "URL and Filename Safe" base64url alphabet, as - defined in Section 5 of [RFC4648], excluding the pad character ("="). - This means the allowed characters are the ASCII alphanumeric - characters ("A-Za-z0-9"), hyphen ("-"), and underscore ("_"). + Where Id is given as a data type, it means a String of at least 1 and + a maximum of 255 octets in size, and it MUST only contain characters + from the URL and Filename Safe base64url alphabet, as defined in + Section 5 of [RFC4648], excluding the pad character (=). This means + the allowed characters are the ASCII alphanumeric characters (A-Za- + z0-9), hyphen (-), and underscore (_). In many places in JSContact a JSON map is used where the map keys are of type Id and the map values are all the same type of object. This construction represents an unordered set of objects, with the added advantage that each entry has a name (the corresponding map key). This allows for more concise patching of objects, and, when applicable, for the objects in question to be referenced from other objects within the JSContact object. Unless otherwise specified for a particular property, there are no uniqueness constraints on an Id value (other than, of course, the requirement that you cannot have two values with the same key within a single JSON map). For example, two Card objects might use the same - Ids in their respective "photos" properties. Or within the same Card - object the same Id could appear in the "emails" and "phones" - properties. These situations do not imply any semantic connections - among the objects. + Ids in their respective photos properties. Or within the same Card + object the same Id could appear in the emails and phones properties. + These situations do not imply any semantic connections among the + objects. -1.5.3. LocalizedString +1.5.3. PatchObject - The purpose of LocalizedString is to allow for internationalisation - of string values. In its simplest form it is just a string value. - Optionally, the human language of this value may be specified, as - well as localized variants in additional languages. A - LocalizedString has the following properties: + A PatchObject is of type String[*], and represents an unordered set + of patches on a JSON object. Each key is a path represented in a + subset of JSON pointer format [RFC6901]. The paths have an implicit + leading /, so each key is prefixed with / before applying the JSON + pointer evaluation algorithm. - * value: "String" (mandatory). The property value. + A patch within a PatchObject is only valid if all of the following + conditions apply: - * language: "String" (optional). The [RFC5646] language tag of this - value, if any. + 1. 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). - * localizations: "String[String]" (optional). A map from [RFC5646] - language tags to the value localized in that language. + 2. All parts prior to the last (i.e., the value after the final + slash) MUST already exist on the object being patched. + + 3. 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., + addresses/1/city and addresses. + + 4. The value for the patch MUST be valid for the property being set + (of the correct type and obeying any other applicable + restrictions), or if null the property MUST be optional. + + The value associated with each pointer determines how to apply that + patch: + + * If null, remove the property from the patched object. If the key + is not present in the parent, this a no-op. + + * If non-null, set the value given as the value for this property + (this may be a replacement or addition to the object being + patched). + + A PatchObject does not define its own @type property. Instead, a + @type property in a patch MUST be handled as any other patched + property value. + + Implementations MUST reject in its entirety a PatchObject if any of + its patches is invalid. Implementations MUST NOT apply partial + patches. 1.5.4. Preference This data type allows to define a preference order on same-typed contact information. For example, a card holder may have two email addresses and prefer to be contacted with one of them. A preference value MUST be an integer number in the range 1 and 100. Lower values correspond to a higher level of preference, with 1 being most preferred. If no preference is set, then the contact information MUST be interpreted as being least preferred. Note that the preference only is defined in relation to contact information of the same type. For example, the preference orders within emails and phone numbers are indendepent of each other. Also note that the _preferredContactMethod_ property allows to define a preferred contact method across method types. 1.5.5. UTCDateTime - This is a string in [RFC3339] "date-time" format, with the further + This is a string in [RFC3339] date-time format, with the further restrictions that any letters MUST be in uppercase, and the time - offset MUST be the character "Z". Fractional second values MUST NOT - be included unless non-zero and MUST NOT have trailing zeros, to - ensure there is only a single representation for each date-time. + offset MUST be the character Z. Fractional second values MUST NOT be + included unless non-zero and MUST NOT have trailing zeros, to ensure + there is only a single representation for each date-time. - For example, "2010-10-10T10:10:10.003Z" is conformant, but - "2010-10-10T10:10:10.000Z" is invalid and is correctly encoded as - "2010-10-10T10:10:10Z". + For example, 2010-10-10T10:10:10.003Z is conformant, but + 2010-10-10T10:10:10.000Z is invalid and is correctly encoded as + 2010-10-10T10:10:10Z. 2. Card - MIME type: "application/jscontact+json;type=card" + MIME type: application/jscontact+json;type=card A Card object stores information about a person, organization or company. 2.1. Metadata properties -2.1.1. uid +2.1.1. @type - Type: "String" (mandatory). + Type: String (mandatory). + + Specifies the type of this object. This MUST be Card. + +2.1.2. uid + + Type: String (mandatory). An identifier, used to associate the object as the same across different systems, addressbooks and views. [RFC4122] describes a range of established algorithms to generate universally unique identifiers (UUID), and the random or pseudo-random version is recommended. For compatibility with [RFC6350] UIDs, implementations MUST accept both URI and free-form text. -2.1.2. prodId +2.1.3. prodId - Type: "String" (optional). + Type: String (optional). The identifier for the product that created the Card object. -2.1.3. created +2.1.4. created - Type: "UTCDateTime" (optional). + Type: UTCDateTime (optional). The date and time when this Card object was created. -2.1.4. updated +2.1.5. updated - Type: "UTCDateTime" (optional). + Type: UTCDateTime (optional). The date and time when the data in this Card object was last modified. -2.1.5. kind +2.1.6. kind - Type: "String" (optional). The kind of the entity the Card - represents. + Type: String (optional). The kind of the entity the Card represents. The value MUST be either one of the following values, registered in a future RFC, or a vendor-specific value: - * "individual": a single person + * individual: a single person - * "org": an organization + * org: an organization - * "location": a named location + * location: a named location - * "device": a device, such as appliances, computers, or network + * device: a device, such as appliances, computers, or network elements - * "application": a software application + * application: a software application -2.1.6. relatedTo +2.1.7. relatedTo - Type: "String[Relation]" (optional). + Type: String[Relation] (optional). - Relates the object to other Card objects. This is represented as a - map of the URI (or single text value) of the related objects to a - possibly empty set of relation types. The Relation object has the - following properties: + Relates the object to other Card and CardGroup objects. This is + represented as a map, where each key is the uid of the related Card + or CardGroup and the value defines the relation. The Relation object + has the following properties: - * relation: "String[Boolean]" (optional, default: empty Object) + * @type: String (mandatory). Specifies the type of this object. + This MUST be Relation. + + * relation: String[Boolean] (optional, default: empty Object) Describes how the linked object is related to the linking object. The relation is defined as a set of relation types. If empty, the relationship between the two objects is unspecified. Keys in the set MUST be one of the RELATED property [RFC6350] type parameter values, or an IANA-registered value, or a vendor-specific value. The value for each key in the set MUST be true. - Note, the Relation object only has one property; it is specified as - an object with a single property to allow for extension in the - future. +2.1.8. language + + Type: String (optional). + + This defines the locale in which free-text property values can be + assumed to be written in. The value MUST be a language tag as + defined in [RFC5646]. Note that such values MAY be localized in the + localizations Section 2.5.1 property. 2.2. Name and Organization properties 2.2.1. name - Type: "NameComponent[]" (optional). + Type: NameComponent[] (optional). The name components of the name of the entity represented by this Card. Name components SHOULD be ordered such that their values joined by whitespace produce a valid full name of this entity. Doing - so, implementations MAY ignore any "separator" components. + so, implementations MAY ignore any separator components. A NameComponent has the following properties: - * value: "String" (mandatory). The value of this name component. + * @type: String (mandatory). Specifies the type of this object. + This MUST be NameComponent. - * type: "String" (mandatory). The type of this name component. The + * value: String (mandatory). The value of this name component. + + * type: String (mandatory). The type of this name component. The value MUST be either one of the following values, registered in a future RFC, or a vendor-specific value: - - "prefix". The value is a honorific title(s), e.g. "Mr", "Ms", + - prefix. The value is a honorific title(s), e.g. "Mr", "Ms", "Dr". - - "personal". The value is a personal name(s), also known as + - personal. The value is a personal name(s), also known as "first name", "given name". - - "surname". The value is a surname, also known as "last name", + - surname. The value is a surname, also known as "last name", "family name". - - "additional". The value is an additional name, also known as + - additional. The value is an additional name, also known as "middle name". - - "suffix". The value is a honorific suffix, e.g. "B.A.", - "Esq.". + - suffix. The value is a honorific suffix, e.g. "B.A.", "Esq.". - - "separator". A separator for two name components. The "value" + - separator. A separator for two name components. The value property of the component includes the verbatim separator, for example a newline character. 2.2.2. fullName - Type: "LocalizedString" (optional). + Type: String (optional). The full name (e.g. the personal name and surname of an individual, the name of an organization) of the entity represented by this card. The purpose of this property is to define a name, even if the individual name components are not known. In addition, it is meant to provide alternative versions of the name for internationalisation. Implementations SHOULD prefer using the _name_ property over this one and SHOULD NOT store the concatenated name component values in this property. 2.2.3. nickNames - Type: "LocalizedString[]" (optional). + Type: String[] (optional). The nick names of the entity represented by this card. 2.2.4. organizations - Type: "Id[Organization]" (optional). + Type: Id[Organization] (optional). The companies or organization names and units associated with this card. An Organization object has the following properties: - * name: "LocalizedString" (mandatory). The name of this - organization. + * @type: String (mandatory). Specifies the type of this object. + This MUST be Organization. - * units: "LocalizedString[]" (optional). Additional levels of - organizational unit names. + * name: String (mandatory). The name of this organization. + + * units: String[] (optional). Additional levels of organizational + unit names. 2.2.5. titles - Type : "Id[Title]" (optional). + Type : Id[Title] (optional). The job titles or functional positions of the entity represented by this card. A Title has object the following properties: - * title: "LocalizedString" (mandatory). The title of the entity - represented by this card. + * @type: String (mandatory). Specifies the type of this object. + This MUST be Title. - * organization: "Id" (optional). The id of the organization in - which this title is held. + * title: String (mandatory). The title of the entity represented by + this card. + + * organization: Id (optional). The id of the organization in which + this title is held. 2.3. Contact and Resource properties 2.3.1. emails - Type: "Id[EmailAddress]" (optional). + Type: Id[EmailAddress] (optional). The email addresses to contact the entity represented by this card. An EmailAddress object has the following properties: - * email: "String" (mandatory). The email address. This MUST be an + * @type: String (mandatory). Specifies the type of this object. + This MUST be EmailAddress. + + * email: String (mandatory). The email address. This MUST be an _addr-spec_ value as defined in Section 3.4.1 of [RFC5322]. - * contexts: "Context[Boolean]" (optional) The contexts in which to - use this email address. The value for each key in the object MUST - be "true". + * contexts: Context[Boolean] (optional) The contexts in which to use + this email address. The value for each key in the object MUST be + true. - * pref: "Preference" (optional) The preference of this email address + * pref: Preference (optional) The preference of this email address in relation to other email addresses. 2.3.2. phones - Type: "Id[Phone]" (optional). + Type: Id[Phone] (optional). The phone numbers to contact the entity represented by this card. A - phone object has the following properties: + Phone object has the following properties: - * phone: "String" (mandatory). The phone value, as either a URI or - a free-text phone number. Typical URI schemes are the [RFC3966] - "tel" or [RFC3261] "sip" schemes, but any URI scheme is allowed. + * @type: String (mandatory). Specifies the type of this object. + This MUST be Phone. - * features: "String[Boolean]" (optional). The set of contact - features that this phone number may be used for. The set is - represented as an object, with each key being a method type. The - value for each key in the object MUST be "true". The method type - MUST be either one of the following values, registered in a future - RFC, or a vendor-specific value: + * phone: String (mandatory). The phone value, as either a URI or a + free-text phone number. Typical URI schemes are the [RFC3966] tel + or [RFC3261] sip schemes, but any URI scheme is allowed. - - "voice" The number is for calling by voice. + * features: String[Boolean] (optional). The set of contact features + that this phone number may be used for. The set is represented as + an object, with each key being a method type. The value for each + key in the object MUST be true. The method type MUST be either + one of the following values, registered in a future RFC, or a + vendor-specific value: - - "fax" The number is for sending faxes. + - voice The number is for calling by voice. - - "pager" The number is for a pager or beeper. + - fax The number is for sending faxes. - - "text" The number supports text messages (SMS). + - pager The number is for a pager or beeper. - - "cell" The number is for a cell phone. + - text The number supports text messages (SMS). - - "textphone" The number is for a device for people with hearing - or speech difficulties. + - cell The number is for a cell phone. - - "video" The number supports video conferencing. + - textphone The number is for a device for people with hearing or + speech difficulties. - - "other" The number is for some other purpose. The label - property MAY be included to display next to the number to help - the user identify its purpose. + - video The number supports video conferencing. - * contexts: "Context[Boolean]" (optional) The contexts in which to - use this number. The value for each key in the object MUST be - "true". + - other The number is for some other purpose. The label property + MAY be included to display next to the number to help the user + identify its purpose. - * label: "String" (optional). A label describing the value in more - detail, especially if the type property has value "other" (but MAY + * contexts: Context[Boolean] (optional) The contexts in which to use + this number. The value for each key in the object MUST be true. + + * label: String (optional). A label describing the value in more + detail, especially if the type property has value other (but MAY be included with any type). - * pref: "Preference" (optional) The preference of this number in + * pref: Preference (optional) The preference of this number in relation to other numbers. 2.3.3. online - Type: "Id[Resource]" (optional). + Type: Id[Resource] (optional). The online resources and services that are associated with the entity represented by this card. A Resource object has the following properties: - * resource: "String" (mandatory). The resource value, where the + * @type: String (mandatory). Specifies the type of this object. + This MUST be Resource. + + * resource: String (mandatory). The resource value, where the allowed value form is defined by the the _type_ property. In any case the value MUST NOT be empty. - * type: "String" (optional, default: "other"). The type of the - resource value. Allowed values are: + * type: String (optional, default: other). The type of the resource + value. Allowed values are: - - "uri" The resource value is a URI, e.g. a website link. This + - uri The resource value is a URI, e.g. a website link. This MUST be a valid _URI_ as defined in Section 3 of [RFC3986] and updates. - - "username" The resource value is a username associated with the + - username The resource value is a username associated with the entity represented by this card (e.g. for social media, or an IM client). The _label_ property SHOULD be included to identify what service this is for. For compatibility between clients, this label SHOULD be the canonical service name, - including capitalisation. e.g. "Twitter", "Facebook", "Skype", - "GitHub", "XMPP". The resource value may be any non-empty free + including capitalisation. e.g. Twitter, Facebook, Skype, + GitHub, XMPP. The resource value may be any non-empty free text. - - "other" The resource value is something else not covered by the + - other The resource value is something else not covered by the above categories. A label property MAY be included to display next to the number to help the user identify its purpose. The resource value may be any non-empty free text. - * mediaType: "String" (optional). Used for URI resource values. + * mediaType: String (optional). Used for URI resource values. Provides the media type [RFC2046] of the resource identified by the URI. - * contexts: "Context[Boolean]" (optional) The contexts in which to - use this resource. The value for each key in the object MUST be - "true". + * contexts: Context[Boolean] (optional) The contexts in which to use + this resource. The value for each key in the object MUST be true. - * label: "String" (optional). A label describing the value in more - detail, especially if the type property has value "other" (but MAY + * label: String (optional). A label describing the value in more + detail, especially if the type property has value other (but MAY be included with any type). - * pref: "Preference" (optional) The preference of this resource in + * pref: Preference (optional) The preference of this resource in relation to other resources. 2.3.4. photos - Type: "Id[File]" (optional). + Type: Id[File] (optional). A map of photo ids to File objects that contain photographs or images associated with this card. A typical use case is to include an avatar for display along the contact name. A File object has the following properties: - * href: "String" (mandatory). A URI where to fetch the data of this + * @type: String (mandatory). Specifies the type of this object. + This MUST be File. + + * href: String (mandatory). A URI where to fetch the data of this file. - * mediaType: "String" (optional). The content-type of the file, if + * mediaType: String (optional). The content-type of the file, if known. - * size: "UnsignedInt" (optional). The size, in octets, of the file + * size: UnsignedInt (optional). The size, in octets, of the file when fully decoded (i.e., the number of octets in the file the user would download), if known. - * pref: "Preference" (optional) The preference of this photo in + * pref: Preference (optional) The preference of this photo in relation to other photos. 2.3.5. preferredContactMethod - Type : "String" (optional) + Type : String (optional) Defines the preferred method to contact the holder of this card. The - value MUST be the property names: "emails", "phones", "online". + value MUST be the property names: emails, phones, online. 2.3.6. preferredContactLanguages - Type : "String[ContactLanguage[]]" (optional) + Type : String[ContactLanguage[]] (optional) Defines the preferred languages for contacting the entity associated with this card. The keys in the object MUST be [RFC5646] language tags. The values are a (possibly empty) list of contact language preferences for this language. A valid ContactLanguage object MUST have at least one of its properties set. A ContactLanguage object has the following properties: - * context: "Context" (optional). Defines the context in which to - use this language. + * @type: String (mandatory). Specifies the type of this object. + This MUST be ContactLanguage. - * pref: "Preference" (optional). Defines the preference of this + * context: Context (optional). Defines the context in which to use + this language. + + * pref: Preference (optional). Defines the preference of this language in relation to other languages of the same context. Also see the definition of the VCARD LANG property (Section 6.4.4., [RFC6350]). 2.4. Address and Location properties 2.4.1. addresses - Type: "Id[Address]" (optional). + Type: Id[Address] (optional). A map of address ids to Address objects, containing physical locations. An Address object has the following properties: - * fullAddress: "LocalizedString" (optional). The complete address, - excluding type and label. This property is mainly useful to - represent addresses of which the individual address components are - unknown, or to provide localized representations. + * @type: String (mandatory). Specifies the type of this object. + This MUST be Address. - * street: "StreetComponent[]" (optional). The street address. The + * fullAddress: String (optional). The complete address, excluding + type and label. This property is mainly useful to represent + addresses of which the individual address components are unknown, + or to provide localized representations. + + * street: StreetComponent[] (optional). The street address. The concatenation of the component values, separated by whitespace, SHOULD result in a valid street address for the address locale. - Doing so, implementations MAY ignore any "separator" components. + Doing so, implementations MAY ignore any separator components. The StreetComponent object type is defined in the paragraph below. - * locality: "String" (optional). The city, town, village, post - town, or other locality within which the street address may be - found. + * locality: String (optional). The city, town, village, post town, + or other locality within which the street address may be found. - * region: "String" (optional). The province, such as a state, - county, or canton within which the locality may be found. + * region: String (optional). The province, such as a state, county, + or canton within which the locality may be found. - * country: "String" (optional). The country name. + * country: String (optional). The country name. - * postcode: "String" (optional). The postal code, post code, ZIP - code or other short code associated with the address by the - relevant country's postal system. + * postcode: String (optional). The postal code, post code, ZIP code + or other short code associated with the address by the relevant + country's postal system. - * countryCode: "String" (optional). The ISO-3166-1 country code. + * countryCode: String (optional). The ISO-3166-1 country code. - * coordinates: "String" (optional) A [RFC5870] "geo:" URI for the + * coordinates: String (optional) A [RFC5870] "geo:" URI for the address. - * timeZone: "String" (optional) Identifies the time zone this - address is located in. This either MUST be a time zone name - registered in the IANA Time Zone Database (https://www.iana.org/ - time-zones), or it MUST be a valid TimeZoneId as defined in - [jscalendar]. For the latter, a corresponding time zone MUST be - defined in the "timeZones" property. + * timeZone: String (optional) Identifies the time zone this address + is located in. This either MUST be a time zone name registered in + the IANA Time Zone Database (https://www.iana.org/time-zones), or + it MUST be a valid TimeZoneId as defined in [RFC8984]. For the + latter, a corresponding time zone MUST be defined in the timeZones + property. - * contexts: "Context[Boolean]" (optional). The contexts of the + * contexts: Context[Boolean] (optional). The contexts of the address information. In addition to the common contexts, allowed values are: - - "billing" An address to be used for billing. + - billing An address to be used for billing. - - "postal" An address to be used for delivering physical items. - The value for each key in the object MUST be "true". + - postal An address to be used for delivering physical items. + The value for each key in the object MUST be true. - * label: "String" (optional). A label describing the value in more + * label: String (optional). A label describing the value in more detail. - * pref: "Preference" (optional) The preference of this address in + * pref: Preference (optional) The preference of this address in relation to other addresses. A StreetComponent object has the following properties: - * type: "String" (mandatory). The type of this street component. - The value MUST be either one of the following values, registered - in a future RFC, or a vendor-specific value: + * @type: String (mandatory). Specifies the type of this object. + This MUST be StreetComponent. - - "name". The street name. + * type: String (mandatory). The type of this street component. The + value MUST be either one of the following values, registered in a + future RFC, or a vendor-specific value: - - "number". The street number. + - name. The street name. - - "apartment". The apartment number or identifier. + - number. The street number. - - "room". The room number or identifier. + - apartment. The apartment number or identifier. - - "extension". The extension designation or box number. + - room. The room number or identifier. - - "direction". The cardinal direction, e.g. "North". + - extension. The extension designation or box number. - - "building". The building or building part this address is + - direction. The cardinal direction, e.g. "North". + + - building. The building or building part this address is located in. - - "floor". The floor this address is located on. + - floor. The floor this address is located on. - - "postOfficeBox". The post office box number or identifier. + - postOfficeBox. The post office box number or identifier. - - "separator". A separator for two street components. The - "value" property of the component includes the verbatim - separator, for example a newline character. + - separator. A separator for two street components. The value + property of the component includes the verbatim separator, for + example a newline character. - - "unknown". A name component value for which no type is known. + - unknown. A name component value for which no type is known. - * value: "String" (mandatory). The value of this street component. + * value: String (mandatory). The value of this street component. -2.5. Additional properties +2.5. Multilingual properties -2.5.1. anniversaries +2.5.1. localizations + + Type: String[PatchObject] (optional). + + A map of language tags [RFC5646] to patches, which localize a + property value into the locale of the respective language tag. The + following example shows an Address object where the value Tokyo is + localized for the jp locale + + "addresses": { + "addr1": { + "@type": "Address", + "locality": "Tokyo", + } + }, + "localizations": { + "jp": { + "addresses/addr1/locality":"東京" + } + } + + Figure 1 + + A patch MUST NOT target the localizations property. + +2.6. Additional properties + +2.6.1. anniversaries Type : Id[Anniversary] (optional). These are memorable dates and events for the entity represented by this card. An Anniversary object has the following properties: - * type: "String" (mandatory). Specifies the type of the - anniversary. This RFC predefines the following types, but - implementations MAY use additional values: + * @type: String (mandatory). Specifies the type of this object. + This MUST be Anniversary. - - "birth": a birth day anniversary + * type: String (mandatory). Specifies the type of the anniversary. + This RFC predefines the following types, but implementations MAY + use additional values: - - "death": a death day anniversary + - birth: a birth day anniversary - - "other": an anniversary not covered by any of the known types. + - death: a death day anniversary - * label: "String" (optional). A label describing the value in more - detail, especially if the type property has value "other" (but MAY + - other: an anniversary not covered by any of the known types. + + * label: String (optional). A label describing the value in more + detail, especially if the type property has value other (but MAY be included with any type). - * date: "String" (mandatory). The date of this anniversary, in the + * date: String (mandatory). The date of this anniversary, in the form "YYYY-MM-DD" (any part may be all 0s for unknown) or a [RFC3339] timestamp. * place: Address (optional). An address associated with this anniversary, e.g. the place of birth or death. -2.5.2. personalInfo +2.6.2. personalInfo - Type: "Id[PersonalInformation]" (optional). + Type: Id[PersonalInformation] (optional). Defines personal information about the entity represented by this card. A PersonalInformation object has the following properties: - * type: "String" (mandatory). Specifies the type for this personal + * @type: String (mandatory). Specifies the type of this object. + This MUST be PersonalInformation. + + * type: String (mandatory). Specifies the type for this personal information. Allowed values are: - - "expertise": a field of expertise or credential + - expertise: a field of expertise or credential - - "hobby": a hobby + - hobby: a hobby - - "interest": an interest + - interest: an interest - - "other": an information not covered by the above categories + - other: an information not covered by the above categories - * value: "String" (mandatory). The actual information. This + * value: String (mandatory). The actual information. This generally is free-text, but future specifications MAY restrict allowed values depending on the type of this PersonalInformation. - * level: "String" (optional) Indicates the level of expertise, or - engagement in hobby or interest. Allowed values are: "high", - "medium" and "low". + * level: String (optional) Indicates the level of expertise, or + engagement in hobby or interest. Allowed values are: high, medium + and low. -2.5.3. notes +2.6.3. notes - Type: "LocalizedString" (optional). + Type: String (optional). Arbitrary notes about the entity represented by this card. -2.5.4. categories +2.6.4. categories - Type: "String[Boolean]" (optional). The set of free-text or URI + Type: String[Boolean] (optional). The set of free-text or URI categories that relate to the card. The set is represented as an object, with each key being a category. The value for each key in - the object MUST be "true". + the object MUST be true. -2.5.5. timeZones +2.6.5. timeZones - Type: "String[TimeZone]" (optional). Maps identifiers of custom time + Type: String[TimeZone] (optional). Maps identifiers of custom time zones to their time zone definitions. For a description of this - property see the "timeZones" property definition in [jscalendar]. + property see the timeZones property definition in [RFC8984]. 3. CardGroup - MIME type: "application/jscontact+json;type=cardgroup" + MIME type: application/jscontact+json;type=cardgroup A CardGroup object represents a group of cards. Its members may be Cards or CardGroups. 3.1. Group properties -3.1.1. uid +3.1.1. @type - Type: "String" (mandatory). The uid of this group. Both CardGroup - and Card share the same namespace for the "uid" property. + Type: String (mandatory). -3.1.2. members + Specifies the type of this object. This MUST be CardGroup. - Type: "String[Boolean]" (mandatory). The members of this group. +3.1.2. uid + + Type: String (mandatory). The uid of this group. Both CardGroup and + Card share the same namespace for the uid property. + +3.1.3. members + + Type: String[Boolean] (mandatory). The members of this group. The set is represented as an object, with each key being the uid of another Card or CardGroup. The value for each key in the object MUST - be "true". + be true. -3.1.3. name +3.1.4. name - Type: "String" (optional). The user-visible name for the group, e.g. + Type: String (optional). The user-visible name for the group, e.g. "Friends". This may be any UTF-8 string of at least 1 character in length and maximum 255 octets in size. The same name may be used by two different groups. -3.1.4. card +3.1.5. card - Type: "Card" (optional). The card that represents this group. + Type: Card (optional). The card that represents this group. 4. Implementation Status NOTE: Please remove this section and the reference to [RFC7942] prior to publication as an RFC. This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in [RFC7942]. The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any @@ -871,24 +985,20 @@ TBD 6. Security Considerations TBD 7. References 7.1. Normative References - [jscalendar] - "JSCalendar: A JSON Representation of Calendar Data", - . - [RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, November 1996, . [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . @@ -907,20 +1017,25 @@ . [RFC6350] Perreault, S., "vCard Format Specification", RFC 6350, DOI 10.17487/RFC6350, August 2011, . [RFC6351] Perreault, S., "xCard: vCard XML Representation", RFC 6351, DOI 10.17487/RFC6351, August 2011, . + [RFC6901] Bryan, P., Ed., Zyp, K., and M. Nottingham, Ed., + "JavaScript Object Notation (JSON) Pointer", RFC 6901, + DOI 10.17487/RFC6901, April 2013, + . + [RFC7095] Kewisch, P., "jCard: The JSON Format for vCard", RFC 7095, DOI 10.17487/RFC7095, January 2014, . [RFC7493] Bray, T., Ed., "The I-JSON Message Format", RFC 7493, DOI 10.17487/RFC7493, March 2015, . [RFC7942] Sheffer, Y. and A. Farrel, "Improving Awareness of Running Code: The Implementation Status Section", BCP 205, @@ -929,20 +1044,25 @@ [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", STD 90, RFC 8259, DOI 10.17487/RFC8259, December 2017, . + [RFC8984] Jenkins, N. and R. Stepanek, "JSCalendar: A JSON + Representation of Calendar Data", RFC 8984, + DOI 10.17487/RFC8984, July 2021, + . + 7.2. Informative References [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, DOI 10.17487/RFC3261, June 2002, . [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,