Internet-Draft | jscontact-vcard | September 2023 |
Loffredo & Stepanek | Expires 21 March 2024 | [Page] |
This document defines how to convert contact information between the JSContact and vCard data formats. To achieve this, it updates RFC I-D.ietf-calext-jscontact (JSContact) by registering new JSContact properties. Similarly, it updates RFC 6350 (vCard) by registering new vCard properties and parameters.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 21 March 2024.¶
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.¶
The JSContact data model and format [I-D.ietf-calext-jscontact] aims to be an alternative to the widely used vCard [RFC6350] standard and jCard [RFC7095].¶
While applications might prefer JSContact to exchange contact card data with other systems, they are likely to interoperate with services and clients that only support vCard or jCard. Similarly, existing contact data providers and consumers already using vCard or jCard might want to represent their contact data also in JSContact.¶
To achieve this, this document defines standard rules to convert contact data between JSContact and vCard (and consequently jCard).¶
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.¶
This section contains the conversion rules from vCard to JSContact Card. It follows the same structure as the vCard v4 [RFC6350]. Properties and parameters of vCard extension RFCs, including the vCard JSContact Extension [I-D.ietf-calext-vcard-jscontact-extensions] are added to appropriate subsections.¶
uid
property
The UID property in vCard is optional, but the uid
property in JSContact is mandatory. Implementations that convert a vCard without UID property MUST generate a unique identifier as a value for the uid
property. This value SHOULD be the same when converting the same vCard multiple times, but how to achieve this is implementation-specific.¶
Multivalued properties in JSContact typically are represented as a JSON object where the object keys are of the Id
type and the object values are the converted vCard property. In absence of the PROP-ID parameter (see Section 2.3.16), implementations are free to choose any identifier for such entries. Whatever identifier generation scheme implementations use, they MUST generate values that are valid according to the definition of the Id
type in [I-D.ietf-calext-jscontact]. For example, this could be an incrementing number across all Id
s or only unique within one JSON object.¶
This converts to the JSContact Boolean
type.¶
The TIMESTAMP type generally converts to the UTCDateTime
. It converts to the Timestamp
type for anniversaries.¶
The DATE type converts to the PartialDate
type, which only is relevant for anniversaries. This does not apply to DATE values that only define a month or a day.¶
The TIME, DATE-TIME, DATE-AND-OR-TIME types and DATE type values that only define a month or day do not convert to a JSContact datetime type. Instead, vCard properties or parameters having such values convert to the properties defined in Section 2.15.¶
This converts to the JSContact Int
and UnsignedInt
types.¶
This converts to the JSContact Number
type.¶
This converts to the JSContact String
type.¶
This converts to the JSContact String
type.¶
This converts to the JSContact String
type.¶
This either converts to a String
containing an IANA TimeZone Database entry name (see Section 2.8.2), or it does not convert to any JSContact type. For the latter, vCard properties or parameters having such values MAY convert to JSContact as defined in Section 2.15.¶
This section contains the conversion rules for vCard parameters. A rule typically only applies for specific vCard properties. To convert a vCard parameter on an arbitrary vCard property, see Section 2.15.2.¶
This does not convert to an IANA-registered property in JSContact, but several conversion rules make use of this parameter to combine multiple vCard properties into a single JSContact object instance. For an example of this see Section 2.6.1. To preserve the verbatim value of the ALTID parameter, set the JSContact properties defined in Section 2.15.¶
This parameter set on a BDAY, DEATHDATE or ANNIVERSARY property converts to the calendarScale
property of the PartialDate
object type.¶
The CREATED parameter value of a vCard NOTE property converts to the created
property of the Note object.¶
Note: This parameter is defined in [I-D.ietf-calext-vcard-jscontact-extensions].¶
If this parameter is set to true
on a vCard property, then implementations MAY choose to not convert that property. Note: This parameter is defined in [I-D.ietf-calext-vcard-jscontact-extensions].¶
This parameter set on an ADR property converts to the JSContact coordinates
property of the Address
object that represents the vCard ADR.¶
This parameter exclusively is for use in jCard (see Section 7.1 of [RFC7095]). It MUST NOT be set in a vCard. Preserving the exact group name when converting from vCard to JSContact and back to vCard is not necessary. Any group identifiers will do, as long as the resulting vCard groups its properties equally to the original vCard. Implementations that still wish to preserve the exact property group name of a vCard property MAY set the group
parameter in the JSContact properties vCardProps
or vCardParams
defined in Section 2.15.¶
This parameter set on the EXPERTISE, HOBBY, INTEREST and ORG-DIRECTORY properties defined in [RFC6715] converts to the JSContact listAs
property of the PersonalInfo
and Directory
objects.¶
This converts to an entry in the localizations
property for the vCard property that this parameter is set on. The value of the LANGUAGE parameter defines the language tag key in the localizations
property.¶
This specification does not define a single standard conversion rule for how to convert the property values. Instead, building the localizations value is implementation-specific.¶
Two options to populate the localizations property are:¶
Generally, localizations only localize properties that are present in the non-localized version of this Card. Figure 3 illustrates this.¶
As a special case, if one or more vCard properties of the same type do not have the LANGUAGE parameter set, then choose them to the non-localized Card. Convert any with LANGUAGE parameters to the localizations property. Figure 4 illustrates this.¶
As the least preferred option, Figure 5 illustrates how all vCard properties of the same type have the LANGUAGE parameter set, but none of their language tags match the language of the main Card. In this case, implementations MAY choose to add the localized vCard properties only to the localizations object.¶
The following example uses non-ASCII characters to demonstrate multilingual content. The ASCII-formatted version of this specification might not show the correct characters. Please refer to the HTML or PDF versions instead.¶
The LEVEL parameter [RFC6715] converts to the level
property of the PersonalInfo
type. If this parameter is set on the EXPERTISE property, then its values convert as:¶
In all other cases the values convert verbatim, but lowercase MUST be used for the JSContact value.¶
This parameter as well as the SCRIPT (Section 2.3.17) parameter set on a N or ADR property convert to JSContact as follows:¶
the values of the phonetic
, phoneticScript
and phoneticSystem
properties of the NameComponent and Name or AddressComponent and Address object types, respectively.¶
The related N or ADR property is defined by the vCard ALTID parameter. The conversion rules for the N (Section 2.5.5) and ADR (Section 2.6.1) properties define how the vCard components convert to JSContact.¶
The value of the PHONETIC parameter converts to the phoneticSystem
property unless it is script
, in which case the phoneticSystem
property is not set. The value of the SCRIPT parameter converts to the phoneticScript
property.¶
The values of the components in the property value convert to values the phonetic
properties for the respective NameComponent or AddressComponent.¶
If more than one property having the PHONETIC parameter set relates to the same property, then they convert to the Card localizations
property according their LANGUAGE parameter values as outlined in Section 2.3.10.¶
This converts to an entry in the vCardParams
property, see Section 2.15.2.¶
The PROP-ID parameter value of a vCard property converts to the Id
of the JSContact property to which the vCard property converts.¶
Note: This parameter is defined in [I-D.ietf-calext-vcard-jscontact-extensions].¶
See Section 2.3.13.¶
This converts to the service
property of the OnlineService
object type. Note: This parameter is defined in [I-D.ietf-calext-vcard-jscontact-extensions].¶
This converts to the sortAs
properties defined for the Name
, Organization
and OrgUnit
object types.¶
This converts to the contexts
property as well as property-specific kind
property values defined in later sections. If not specified otherwise for a specific JSContact property, the vCard home
and work
parameter values convert to the JSContact private
and work
contexts, respectively.¶
This parameter set on an ADR property converts to the JSContact timeZone
property of the Address
object that represents the vCard ADR. Also see the conversion of the TZ property in Section 2.8.2.¶
This converts to the user
property of the OnlineService
object type. Note: This parameter is defined in [I-D.ietf-calext-vcard-jscontact-extensions].¶
This does not convert to an IANA-registered property in JSContact. To preserve properties with experimental values, see Section 2.15.2 and Section 2.15.1.¶
These do not convert to IANA-registered properties in JSContact.¶
The KIND property converts to the kind
property (Figure 8). Allowed values are those described in Section 6.1.4 of [RFC6350] and extended with the values declared in [RFC6473] and [RFC6869].¶
The SOURCE property converts to a Directory object in the directories
property (Figure 9). The kind
property is set to entry
. The uri
property is set to the SOURCE property value.¶
The PREF and MEDIATYPE parameters convert according to the rules as defined in Section 2.3.¶
This converts to an entry in the vCardProps
property, see Section 2.15.1.¶
The BDAY and ANNIVERSARY properties and the extensions BIRTHPLACE, DEATHDATE, DEATHPLACE described in [RFC6474] are represented as Anniversary
objects included in the anniversaries
property (Figure 10):¶
BDAY and BIRTHPLACE convert to date
and place
where kind
is set to "birth";¶
DEATHDATE and DEATHPLACE convert to date
and place
where kind
is set to "death";¶
date
where kind
is "wedding".¶
Both birth and death places are represented as instances of the Address
object.¶
The BIRTHPLACE and DEATHPLACE properties that are represented as geo URIs convert to Address
instances including only the coordinates
property. If the URI value is not a geo URI, the place is ignored.¶
The ALTID and LANGUAGE parameters of both BIRTHPLACE and DEATHPLACE properties convert according to the rules as defined in Section 2.3.¶
The FN property converts to the Name object in the name
property. Its value converts to the Name object full
property (Figure 11). If the LANGUAGE parameter is set, then the FN property converts as outlined in Section 2.3.10. In the unexpected case that the vCard contains more than one FN property without LANGUAGE parameter, then convert the FN property that has the least parameters set to the full
property. If multiple such FN properties are present, choose any of them. All other FN properties convert to the vCardProps
(Section 2.15.1) property.¶
This does not map to an IANA-registered property in JSContact. To convert this property, see Section 2.15.1. Note the alternative JSContact speakToAs
property which defines how to address and refer to an individual represented by the card, as do the newly defined vCard GRAMGENDER and PRONOUNS properties of [I-D.ietf-calext-vcard-jscontact-extensions].¶
The GRAMGENDER property converts to the grammaticalGender
property of the SpeakToAs
object (Figure 12).¶
The PRONOUNS property converts to an entry in the pronouns
property of the SpeakToAs
object (Figure 12).¶
The N property converts to the Name object in the name
property. Each component in the N property structured value converts to a NameComponent in the Name components
property. The following table shows this relation:¶
N component | NameComponent kind | Remarks |
---|---|---|
Family name | surname | To vCard: add any surname2 NameComponent value in here, after all surname values.From vCard: ignore any value that also occurs in the Secondary surname component. |
Given name | given | |
Additional name | given2 | |
Honorific prefix | title | |
Honorific suffix | credential | To vCard: add any generation NameComponent value also in here.From vCard: ignore any value that also occurs in the Generation component. |
Secondary surname | surname2 | |
Generation | generation |
If the JSCOMPS (Section 3.3.1) parameter is set, then the Name isOrdered
property value is "true", and the defaultSeparator
and any separator name components are set according to the parameter value. The components
list MUST adhere to the order of the JSCOMPS parameter value.¶
If the JSCOMPS parameter is not set, then the Name isOrdered
property value is "false" and the defaultSeparator
property MUST NOT be set. The components
list MUST follow the order of values in the N structured value when read from left to right.¶
If the SORT-AS parameter is set, then its structured value converts to the Name sortAs
property according to Table 1. An empty or non-existent component value indicates that no sort is defined for this kind.¶
See Section 3.3.1 for examples of using the JSCOMPS parameter for vCard structured property values.¶
The ADR property converts to an Address object in the addresses
property. Each component in the ADR property structured value converts to an AddressComponent in the Address components
property.¶
[I-D.ietf-calext-vcard-jscontact-extensions] defines new component for the ADR property. Implementations SHOULD set these new components, even if all their values are the empty string.¶
The following table shows how ADR component and AddressComponent kind relate:¶
ADR component | AddressComponent kind | Remarks |
---|---|---|
post office box | postOfficeBox | [RFC6350] recommends this component not be set, but this now is disputable given the new components. Instead, set this component and use the new ADR value format defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
extended address | apartment (see Remarks) |
To vCard: Set the values of the following components:¶ From vCard: Ignore if the ADR structured value is of the format defined in [I-D.ietf-calext-vcard-jscontact-extensions]. Otherwise convert to |
street address | name (see Remarks) |
To vCard: Set the values of the following components:¶ From vCard: Ignore if the ADR structured value is of the format defined in [I-D.ietf-calext-vcard-jscontact-extensions]. Otherwise convert to |
locality | locality | |
region | region | |
postal code | postcode | |
apartment | apartment | Defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
block | block | Defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
building | building | Defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
direction | direction | Defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
district | district | Defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
floor | floor | Defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
landmark | landmark | Defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
room | room | Defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
street number | number | Defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
subdistrict | subdistrict | Defined in [I-D.ietf-calext-vcard-jscontact-extensions]. |
If the JSCOMPS (Section 3.3.1) parameter is set, then the Address isOrdered
property value is "true", and the defaultSeparator
and any separator name components are set according to the parameter value. The components
list MUST adhere to the order of the JSCOMPS parameter value.¶
If the JSCOMPS parameter is not set, then the Address isOrdered
property value is "false" and the defaultSeparator
property MUST NOT be set. The components
list MUST follow the order of values in the ADR structured value when read from left to right.¶
The LABEL parameter converts to the Address full
property.¶
The GEO parameter converts to the Address coordinates
property.¶
The TZ parameter converts to the Address timeZone
property.¶
The CC parameter as defined in [RFC8605] converts to the Address countryCode
property.¶
The PREF and TYPE parameters convert according to the rules as defined in Section 2.3. The ADR-specific values of the TYPE parameter defined in Sections 5.1 and 5.2 of [I-D.ietf-calext-vcard-jscontact-extensions] convert to the corresponding entries of the contexts
property as defined in Section 2.5.1 of [I-D.ietf-calext-jscontact].¶
The ALTID and LANGUAGE parameters convert according to the rules as defined in Section 2.3. Each possible language-dependent alternative is represented as an entry of the PatchObject map where the key references the full
property.¶
See Section 3.3.1 for examples of using the JSCOMPS parameter for vCard structured property values.¶
An EMAIL property converts to an entry in the emails
property (Figure 17). The entry value is an EmailAddress
object. The address
property is set to the EMAIL value.¶
The PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
An IMPP property converts to an entry in the onlineServices
property (Figure 18). The entry value is an OnlineService
object. The vCardName
property is set to "impp" and the uri
property is set to the IMPP value.¶
The SERVICE-TYPE, USERNAME, PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
A LANG property converts to an entry in the preferredLanguages
property (Figure 19). The entry value is an LanguagePref
object. The LanguagePref language
property value is the LANG property value.¶
The PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
The LANGUAGE property converts to the language
property (Figure 20).¶
Note: This property is defined in [I-D.ietf-calext-vcard-jscontact-extensions].¶
A TEL property converts to an entry in the phones
property (Figure 22). The entry value is a Phone
object.¶
The TEL-specific values of the TYPE parameter convert to the features
property keys as outlined in table Table 3. Note that Section 6.4.1 of [RFC6350] defines the default TYPE of TEL to be voice
, but the default Phone features property is absent by default. Accordingly, an implementation SHOULD only set the Phone features
property if the TEL property actually has a TEL-specific TYPE parameter set.¶
TYPE value | Phone feature |
---|---|
cell | mobile |
fax | fax |
main-number | main-number |
pager | pager |
text | text |
textphone | textphone |
video | video |
voice | voice |
The value of the TEL property converts to the Phone number
property.¶
The PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
This converts to the coordinates
property of the Address
object. Also see Section 2.8.3 to determine which Address
object instance to convert to.¶
A value of type TEXT converts to the timeZone
property in the Address
object.¶
A value of type UTC-OFFSET converts to the timeZone
property in the Address
object if the offset has zero minutes and the hour offset is in the range -12 <= 14:¶
Etc/UTC
.¶
Etc/GMT
suffixed with the string representation of the reversed sign hour offset, including the sign but excluding leading zeros and minutes. For example, the UTC offset value -0500
converts to Etc/GMT+5
.¶
For such property values, also see Section 2.8.3 to determine which Address
object instance to convert to.¶
Any other value of type UTC-OFFSET or URI does not convert to an IANA-registered property in JSContact. To convert such property, see Section 2.15.1.¶
In vCard the properties ADR, GEO and TZ occur independently of each other. In JSContact, they all convert to properties of an Address
object. It is implementation-specific if these vCard properties convert to separate address instances in JSContact, or if some or all of them convert to the same address. That being said, implementations MUST convert the properties to the same address for the following cases:¶
A CONTACT-URI property as defined in [RFC8605] is represented as an entry of the links
property (Figure 23). The entry value is a Link
object whose kind
property is set to contact
and uri
property is set to the CONTACT-URI value.¶
The PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
A LOGO property converts to an entry in the media
property (Figure 24). The entry value is a Media
object whose kind
property is set to logo
and uri
property is set to the LOGO value.¶
The PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
The uids of the contact cards composing the group are included in the members
property (Figure 25).¶
In this case, the PREF parameter does not have a JSContact counterpart; however, the implementors MAY insert the map entries by order of preference.¶
An ORG property converts to an entry in the organizations
property (Figure 26). The entry value is an Organization
object whose name
property contains the organizational name, and the units
property is an array of OrgUnit
objects each containing the organizational unit name in the name
property.¶
Implementations MAY allow representation of organizational units without the organizational name. In this case, the first component of the ORG value MUST be an empty string (e.g., ORG:;DepartmentA).¶
The ALTID, LANGUAGE parameters convert according to the rules as defined in Section 2.3.¶
The first item of the comma-separated SORT-AS parameter value converts to the sortAs
property of the Organization
object. The subsequent items convert to the sortAs
property of the corresponding OrgUnit
object.¶
The TYPE parameter converts according to the rules as defined in Section 2.3.¶
Both TITLE and ROLE properties are represented as entries of the titles
property (Figure 28). The entry value is a Title
object whose kind
property is set to title
or role
for TITLE and ROLE vCard properties, respectively. The name
property is set to the vCard property value.¶
The value of the organization
property can be derived if the TITLE or ROLE property is member of a vCard property group and exactly one other ORG property also is part of that group.¶
The ALTID and LANGUAGE parameters convert according to the rules as defined in Section 2.3.¶
An EXPERTISE property as defined in [RFC6715] is represented as a PersonalInfo
object in the personalInfo
property (Figure 29). The kind
property is set to "expertise".¶
The INDEX parameter converts according to the rules as defined in Section 2.3.¶
A HOBBY property as defined in [RFC6715] is represented as a PersonalInfo
object in the personalInfo
property (Figure 30). The kind
property is set to "hobby".¶
The INDEX parameter converts according to the rules as defined in Section 2.3.¶
An INTEREST property as defined in [RFC6715] is represented as a PersonalInfo
object in the personalInfo
property (Figure 31). The kind
property is set to "interest".¶
The INDEX parameter converts according to the rules as defined in Section 2.3.¶
The ORG-DIRECTORY property [RFC6715] converts to a Directory object in the directories
property (Figure 32). The kind
property is set to directory
. The uri
property is set to the ORG-DIRECTORY property value.¶
The INDEX, PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
A CATEGORIES property converts to a set of entries of the keywords
property (Figure 33). The keys are the comma-separated text values of the CATEGORIES property.¶
In this case, the PREF parameter does not have a JSContact counterpart; however, the implementors MAY insert the map entries by order of preference.¶
These convert to the vCardProps
(Section 2.15.1) and vCardParams
(Section 2.15.2) properties.¶
The CREATED property converts to the created
property (Figure 34).¶
Note: This property is defined in [I-D.ietf-calext-vcard-jscontact-extensions].¶
A NOTE property converts to a Note
object in the notes
map (Figure 35).¶
The ALTID and LANGUAGE parameters convert according to the rules as defined in Section 2.3.¶
A SOUND property converts to an entry in the media
property (Figure 38). The entry value is a Media
object whose kind
property is set to sound
and uri
property is set to the SOUND value.¶
The PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
A URL property converts to an entry in the links
property (Figure 40). The entry value is a Link
object whose uri
property is set to the URL value.¶
The PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
This converts to an entry in the vCardProps
(Section 2.15.1) property.¶
This property is experimental but widely in use in existing vCard data. It converts to the label
property of a JSContact object type. The X-ABLabel property is preceded by a vCard property group name, and the label converts to the JSContact object which got converted from a vCard property having the same group.¶
The group name is not preserved, implementations are free to choose any unique group name when converting back to vCard. For an example how to preserve the group name see Section 2.3.8.¶
A CALADRURI property converts to an entry in the schedulingAddresses
property (Figure 43). The entry value is a SchedulingAddress
object whose uri
property is set to the CALADRURI value.¶
The PREF parameter converts according to the rules as defined in Section 2.3.¶
A CALURI property converts to an entry in the calendars
property (Figure 44). The entry value is a Calendar
object whose kind
property is set to calendar
and uri
property is set to the CALURI value.¶
The PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
An FBURL property converts to an entry in the calendars
property (Figure 45). The entry value is a Calendar
object whose kind
property is set to freeBusy
and uri
property is set to the FBURL value.¶
The PREF and TYPE parameters convert according to the rules as defined in Section 2.3.¶
These convert as specified in Section 2.15.¶
vCards may contain properties or parameters for which no IANA-registered JSContact property is defined. For example, a vCard may contain properties and parameters of which the semantics or purposes are unknown to the implementation; see Section 6.10 of [RFC6350].¶
This section defines JSContact properties by which such vCard properties and parameters MAY be represented in JSContact. Implementations MAY choose to convert differently if they deem that more appropriate.¶
vCardProps
vCardProps
¶
JCardProp[]
, where JCardProp
denotes a jCard-encoded vCard property as defined in Section 3.3 of [RFC7095].¶
This illustrates how to convert a vCard extension property:¶
vCardParams
vCardParams
¶
String[String|String[]]
¶
This illustrates how to convert a vCard extension parameter:¶
vCardName
vCardName
¶
String
¶
name
ABNF defined in Section 3.3 of [RFC6350].¶
Both vCard IMPP and SOCIALPROFILE convert to OnlineService in JSContact. The vCardName
property value indicates that the vCard source element was IMPP:¶
A Card
converts to vCard by applying the reverse rules of converting vCard to JSContact. In addition to those listed in Appendix A, the following rules apply:¶
Id
of the converted value (see Section 2.3.16).¶
The full
property of the name
property in JSContact is optional, but the FN property is mandatory in vCard. The following rules apply:¶
full
property is set, then implementations MUST use its value for the vCard FN property.¶
full
property is not set, then implementations SHOULD derive the full name from the Name components
values. If the isOrdered
property is true, then this can be done by concatenating the name component values. Otherwise, or alternatively, an implementation can choose any other heuristic to generate the full name from its components, such as [CLDRPersonName]. Implementations MUST set the DERIVED parameter on the FN property.¶
JSContact object types may contain properties for which no IANA-registered vCard property is defined. For example, a JSContact object may contain vendor-specific properties of which the semantics or purpose are unknown.¶
This specification defines the new JSPROP
(Section 3.2.1) vCard property and JSPTR
(Section 3.3.2) vCard parameter by which such JSContact properties MAY be represented in vCard. Implementations MAY choose to convert differently if they deem that more appropriate.¶
This property converts an arbitrary JSContact property from and to vCard. The vCard property value is the JSON-encoded value of the JSContact property, represented as a TEXT value. The format of the JSON value MUST be compact, e.g., without insignificant whitespace. The value of the JSPTR parameter points to the JSContact property within the Card.¶
The root of the JSON pointer is always the Card object that this vCard converts to, irrespective if the JSON pointer starts with the SOLIDUS (U+002F) character. The pointer MUST NOT reference into an array.¶
All JSPROP properties in a vCard together form a PatchObject as defined in [I-D.ietf-calext-jscontact]. The value of its JSPTR parameter corresponds to a key in the PatchObject, the value of the JSPROP property corresponds to the value for that key. When converting from vCard to JSContact, the PatchObject MUST only be applied after all other vCard properties have already been converted. The PatchObject MUST be valid, including the restriction that an invalid PatchObject MUST NOT be applied.¶
This property is defined by the following notation:¶
jsprop = "JSPROP" jsprop-param ":" TEXT jsprop-param = *( ; The following are MANDATORY and MUST NOT ; occur more than once ( ";" jsptr-param ) / ; see next section ( ";" "VALUE" "=" "TEXT") ; ; The following is OPTIONAL, ; and MAY occur more than once. ; (";" other-param) ; )¶
This illustrates how to convert a property at the top-level in a Card object that is unknown to the implementation.¶
This illustrates how to convert a vendor-specific property at the top-level of a Card object. Note the required use of quoted string for the JSPTR value which allows the path to include the COLON (U+003A) character.¶
This illustrates how to convert a vendor-specific property at a nested level in a Card object using a path relative to the Card object. Although not recommended, the property name includes the SOLIDUS (U+002F) character which requires escaping in the JSON pointer.¶
The JSCOMPS parameter value facilitates converting name and address components between JSContact and vCard. It preserves the order of the components the JSContact property and contains the verbatim values of separator components.¶
If this parameter is set and its value is valid (see later), then implementations MUST set the isOrdered
property of the Name or Address object to "true". Otherwise, they MUST set the isOrdered
property value to "false".¶
The JSCOMPS parameter value is a structured type value. Its value MUST be quoted. The parameter value consists of a sequence of entries, separated by the SEMICOLON character (U+003B). The first entry defines the value of the defaultSeparator
property. If it is the empty string then no default separator is defined. Otherwise, the first entry MUST be a separator entry. All following entries processed in order result in an ordered list of JSContact components, and MUST be one of two following two kinds:¶
A positional. This refers to a component value in the vCard structured value A position consists of the numeric index of a component in the structured value, optionally followed by a COMMA (U+002C) character and the non-zero index of a value within that component. The zero index selects the first component or value, respectively. The second index by default is zero, in which case it MUST be omitted (as well as the leading COMMA).¶
The resulting JSContact component is formed by determining its kind by the position in the vCard structured value. The component value is the verbatim value of the vCard component. Figure 52 and Figure 53 illustrate this by example.¶
A separator. This contains the verbatim value of a separator component. It starts with the LATIN SMALL LETTER S (U+0073) character, followed by COMMA (U+002C), followed by zero or more Section 3.3 of [RFC6350] characters, where the COMMA (U+002c) and SEMICOLON (U+003B) character MUST be escaped according to the rules defined in Section 3.4 of [RFC6350]. Figure 54 illustrates this by example.¶
The resulting JSContact component is formed by setting its kind to separator
and its value to the verbatim value of the entry.¶
A JSCOMPS parameter value is valid if and only if:¶
The count of positional entries equals the count of deduplicated component values. Deduplication is required because some values may occur in both their designated and backwards-compatible components in the vCard property value:¶
jscomps-param = "JSCOMPS" "=" DQUOTE ( (jscomps-entry-sep / "") ";" jscomps-entrylist ) DQUOTE jscomps-entrylist = jscomps-entry *(";" jscomps-entry) jscomps-entry = jscomps-entry-pos / jscomps-entry-sep jscomps-entry-pos = 1*DIGIT [ "," 1*DIGIT ] jscomps-entry-sep = "s" "," jscomps-entry-verb jscomps-entry-verb = *QSAFE-CHAR¶
The following example demonstrates the use of positional entries for the name "Jane Doe". The given name is ordered before the surname. No secondary index is required for either positional because both are zero.¶
The following example demonstrates a secondary positional index. The "Jr." generation marker only counts once because it occurs in both the designated generation component and the backwards-compatible honorific suffixes component.¶
The following example demonstrates the use of separator entries for the (shortened for brevity) address "54321 Oak St, Reston". The first entry defines the default separator to be ", ". The second and fourth positional entries are separated with the separator value " ". For backwards-compatibility, the street address component of the ADR property contains both the street number and name, but it is not referred to in the JSCOMPS parameter and does not contribute to the count of values.¶
This parameter has a single value that MUST be a valid JSON pointer as defined in [RFC6901]. Note that the value MUST be quoted according to the param-value
ABNF in [RFC6350].¶
jsptr-param = "JSPTR" "=" param-value ; also see param-value in RFC 6350, section 3.3¶
This illustrates a simple example. For further examples see Section 3.2.1.¶
JSPROP;JSPTR="example.com:foo":"bar"¶
This specification defines how to convert between the JSContact and vCard formats. The security considerations for parsing and formatting such data apply and are outlined in Section 5 of [I-D.ietf-calext-jscontact] and Section 9 of [RFC6350].¶
The definition and examples of the PHONETIC (Section 2.3.13) and SCRIPT (Section 2.3.17) parameters are based on the initial version of [I-D.calconnect-vobject-i18n].¶
IANA is requested to add the following entries to the "vCard Properties" registry, defined in Section 10.3.1. of [RFC6350].¶
Namespace | Property | Reference |
---|---|---|
JSPROP | This document, Section 3.2.1 |
IANA is requested to add the following entries to the "vCard Parameters" registry, defined in Section 10.3.2. of [RFC6350].¶
Namespace | Parameter | Reference |
---|---|---|
JSPTR | This document, Section 3.3.2 |
IANA is requested to add the following entries to the "JSContact Properties" registry. The Since Version for all properties is 1.0. The Until Version for all properties is not set. All RFC section references are for this document. The change controller for all these properties is IETF.¶
Property Name | Property Type | Property Context | Reference or Description | Intended Usage |
---|---|---|---|---|
vCardName | String | Any JSContact object | Section 2.15.3 | common |
vCardParams | String[String] | Any JSContact object | Section 2.15.2 | common |
vCardProps | JCardProp[] | Card | Section 2.15.1 | common |
IANA is requested to add the following entries to the "JSContact Types" registry. The Since Version for all properties is 1.0. The Until Version for all properties is not set. All RFC section references are for this document. The change controller for all these properties is IETF.¶
Type Name | Reference or Description | Intended Usage |
---|---|---|
JCardProp | Section 2.15.1 | common |
NOTE: Please remove this section and the reference to RFC 7942 prior to publication as an RFC.¶
This section records the status of known implementations of the protocol as defined in 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 individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist.¶
According to RFC 7942, "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".¶
Table 8 lists the relevant document sections for each JSContact object type and property.¶
JSContact Type | Property Name | Relevant Section(s) |
---|---|---|
Address | @type | not applicable |
Address | components | Section 2.6.1, Section 3.3.1 |
Address | contexts | Section 2.3.20 |
Address | coordinates | Section 2.3.7, Section 2.8.1 |
Address | country | Section 2.6.1 |
Address | countryCode | Section 2.6.1 |
Address | defaultSeparator | Section 2.6.1, Section 3.3.1 |
Address | full | Section 2.6.1 |
Address | isOrdered | Section 2.6.1, Section 3.3.1 |
Address | locality | Section 2.6.1 |
Address | phoneticScript | Section 2.3.13, Section 2.3.17 |
Address | phoneticSystem | Section 2.3.13 |
Address | postcode | Section 2.6.1 |
Address | pref | Section 2.3.15 |
Address | region | Section 2.6.1 |
Address | timeZone | Section 2.3.21, Section 2.8.2 |
AddressComponent | phonetic | Section 2.3.13 |
Anniversary | @type | not applicable |
Anniversary | date | Section 2.5.1 |
Anniversary | kind | Section 2.5.1 |
Anniversary | place | Section 2.5.1 |
Author | @type | not applicable |
Author | name | Section 2.3.3 |
Author | uri | Section 2.3.2 |
Calendar | @type | not applicable |
Calendar | contexts | Section 2.3.20 |
Calendar | kind | Section 2.13.1, Section 2.13.3 |
Calendar | label | Section 2.11.11 |
Calendar | mediaType | Section 2.3.12 |
Calendar | pref | Section 2.3.15 |
Calendar | uri | Section 2.13.1, Section 2.13.3 |
Card | @type | not applicable |
Card | @version | not applicable |
Card | addresses | Section 2.6.1 |
Card | anniversaries | Section 2.5.1 |
Card | calendars | Section 2.13.1, Section 2.13.3 |
Card | created | Section 2.11.3 |
Card | directories | Section 2.4.3, Section 2.10.4 |
Card | emails | Section 2.7.1 |
Card | keywords | Section 2.11.1 |
Card | kind | Section 2.4.2 |
Card | language | Section 2.7.4 |
Card | links | Section 2.9.1, Section 2.11.9 |
Card | localizations | Section 2.3.10 |
Card | media | Section 2.5.7, Section 2.9.2, Section 2.11.7 |
Card | members | Section 2.9.3 |
Card | name | Section 2.5.5 |
Card | nicknames | Section 2.5.5 |
Card | notes | Section 2.11.4 |
Card | onlineServices | Section 2.7.2 |
Card | organizations | Section 2.9.4 |
Card | personalInfo | Section 2.10.1, Section 2.10.2, Section 2.10.3 |
Card | phones | Section 2.7.6 |
Card | preferredLanguages | Section 2.7.3 |
Card | prodId | Section 2.11.5 |
Card | relatedTo | Section 2.9.5 |
Card | schedulingAddresses | Section 2.13.1 |
Card | speakToAs | Section 2.5.4 |
Card | titles | Section 2.9.6 |
Card | uid | Section 2.11.8 |
Card | updated | Section 2.11.6 |
CryptoKey | @type | not applicable |
CryptoKey | contexts | Section 2.3.20 |
CryptoKey | kind | not applicable |
CryptoKey | label | Section 2.11.11 |
CryptoKey | mediaType | Section 2.3.12 |
CryptoKey | pref | Section 2.3.15 |
CryptoKey | uri | Section 2.12.1 |
Directory | @type | not applicable |
Directory | contexts | Section 2.3.20 |
Directory | kind | Section 2.4.3, Section 2.10.4 |
Directory | label | Section 2.11.11 |
Directory | listAs | Section 2.3.9 |
Directory | mediaType | Section 2.3.12 |
Directory | pref | Section 2.3.15 |
Directory | uri | Section 2.4.3, Section 2.10.4 |
EmailAddress | @type | not applicable |
EmailAddress | address | Section 2.7.1 |
EmailAddress | contexts | Section 2.3.20 |
EmailAddress | label | Section 2.11.11 |
EmailAddress | pref | Section 2.3.15 |
LanguagePref | @type | not applicable |
LanguagePref | contexts | Section 2.3.20 |
LanguagePref | pref | Section 2.3.15 |
Link | @type | not applicable |
Link | contexts | Section 2.3.20 |
Link | kind | Section 2.9.1, Section 2.11.9 |
Link | label | Section 2.11.11 |
Link | mediaType | Section 2.3.12 |
Link | pref | Section 2.3.15 |
Link | uri | Section 2.9.1, Section 2.11.9> |
Media | @type | not applicable |
Media | contexts | Section 2.3.20 |
Media | kind | Section 2.5.7, Section 2.9.2, Section 2.11.7 |
Media | label | Section 2.11.11 |
Media | mediaType | Section 2.3.12 |
Media | pref | Section 2.3.15 |
Media | uri | Section 2.5.7, Section 2.9.2, Section 2.11.7 |
Name | @type | not applicable |
Name | components | Section 2.5.5, Section 3.3.1 |
Name | defaultSeparator | Section 2.5.5, Section 3.3.1 |
Name | full | Section 2.5.2 |
Name | phoneticScript | Section 2.3.13, Section 2.3.17 |
Name | phoneticSystem | Section 2.3.13 |
Name | isOrdered | Section 2.5.5, Section 3.3.1 |
Name | sortAs | Section 2.3.19 |
NameComponent | @type | not applicable |
NameComponent | kind | Section 2.5.5 |
NameComponent | phonetic | Section 2.3.13 |
NameComponent | value | Section 2.5.5 |
Nickname | @type | not applicable |
Nickname | contexts | Section 2.3.20 |
Nickname | name | Section 2.5.5 |
Nickname | pref | Section 2.3.15 |
Note | @type | not applicable |
Note | author | Section 2.3.2, Section 2.3.3 |
Note | created | Section 2.3.5 |
Note | note | Section 2.11.4 |
OnlineService | @type | not applicable |
OnlineService | contexts | Section 2.3.20 |
OnlineService | kind | Section 2.7.2, Section 2.7.5 |
OnlineService | label | Section 2.11.11 |
OnlineService | pref | Section 2.3.15 |
OnlineService | service | Section 2.3.18 |
OnlineService | uri | Section 2.7.2, Section 2.7.5 |
OnlineService | user | Section 2.3.22 |
OrgUnit | @type | not applicable |
OrgUnit | name | Section 2.9.4 |
OrgUnit | sortAs | Section 2.3.19 |
Organization | @type | not applicable |
Organization | contexts | Section 2.3.20 |
Organization | name | Section 2.9.4 |
Organization | sortAs | Section 2.3.19 |
Organization | units | Section 2.9.4 |
PartialDate | @type | not applicable |
PartialDate | calendarScale | Section 2.3.4 |
PartialDate | day | Section 2.2.2 |
PartialDate | month | Section 2.2.2 |
PartialDate | year | Section 2.2.2 |
PatchObject | @type | not applicable |
PersonalInfo | @type | not applicable |
PersonalInfo | kind | Section 2.10.1, Section 2.10.2, Section 2.10.3 |
PersonalInfo | listAs | Section 2.3.9 |
PersonalInfo | level | Section 2.3.11 |
PersonalInfo | value | Section 2.10.1, Section 2.10.2, Section 2.10.3 |
Phone | @type | not applicable |
Phone | contexts | Section 2.3.20 |
Phone | features | Section 2.7.6 |
Phone | label | Section 2.11.11 |
Phone | number | Section 2.7.6 |
Phone | pref | Section 2.3.15 |
Pronouns | @type | not applicable |
Pronouns | contexts | Section 2.3.20 |
Pronouns | pref | Section 2.3.15 |
Pronouns | pronouns | Section 2.5.4 |
Relation | @type | not applicable |
Relation | relation | Section 2.9.5 |
Resource | @type | not applicable |
SchedulingAddress | @type | not applicable |
SchedulingAddress | contexts | Section 2.3.20 |
SchedulingAddress | label | Section 2.11.11 |
SchedulingAddress | pref | Section 2.3.15 |
SchedulingAddress | uri | Section 2.13.1 |
SpeakToAs | @type | not applicable |
SpeakToAs | grammaticalGender | Section 2.5.4 |
SpeakToAs | pronouns | Section 2.5.4 |
AddressComponent | @type | not applicable |
AddressComponent | kind | Section 2.6.1 |
AddressComponent | value | Section 2.6.1 |
Timestamp | @type | not applicable |
Timestamp | utc | Section 2.2.2 |
Title | @type | not applicable |
Title | kind | Section 2.9.6 |
Title | name | Section 2.9.6 |
Title | organization | Section 2.9.6 |