rfc9555v2.txt   rfc9555.txt 
Internet Engineering Task Force (IETF) M. Loffredo Internet Engineering Task Force (IETF) M. Loffredo
Request for Comments: 9555 IIT-CNR/Registro.it Request for Comments: 9555 IIT-CNR/Registro.it
Updates: 6350 R. Stepanek Updates: 6350 R. Stepanek
Category: Standards Track Fastmail Category: Standards Track Fastmail
ISSN: 2070-1721 March 2024 ISSN: 2070-1721 April 2024
JSContact: Converting from and to vCard JSContact: Converting from and to vCard
Abstract Abstract
This document defines how to convert contact information between the This document defines how to convert contact information between the
JSContact and vCard data formats. It defines conversion rules for JSContact and vCard data formats. It defines conversion rules for
every JSContact and vCard element registered at IANA at the time of every JSContact and vCard element registered at IANA at the time of
publication. It also defines new JSContact properties as well as publication. It also defines new JSContact properties as well as
vCard properties and parameters, to support converting arbitrary or vCard properties and parameters, to support converting arbitrary or
skipping to change at line 532 skipping to change at line 532
2.3.15. PHONETIC 2.3.15. PHONETIC
The PHONETIC parameter (Section 4.6 of [RFC9554]) converts to the The PHONETIC parameter (Section 4.6 of [RFC9554]) converts to the
Name (Section 2.2.1 of [RFC9553]) and Address (Section 2.5.1 of Name (Section 2.2.1 of [RFC9553]) and Address (Section 2.5.1 of
[RFC9553]) objects' phoneticSystem property unless the parameter [RFC9553]) objects' phoneticSystem property unless the parameter
value is "script", in which case the phoneticSystem property is not value is "script", in which case the phoneticSystem property is not
set. set.
The value of the SCRIPT parameter converts to the phoneticScript The value of the SCRIPT parameter converts to the phoneticScript
property (see Section 2.3.15). property (see Section 2.3.19).
The related N or ADR property is defined by the vCard ALTID 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 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 (Section 2.6.1) properties define how the vCard components convert to
JSContact. JSContact.
The component values of the property on which the PHONETIC parameter The component values of the property on which the PHONETIC parameter
is set convert to the respective NameComponent or AddressComponent is set convert to the respective NameComponent or AddressComponent
objects' phonetic properties. objects' phonetic properties.
skipping to change at line 582 skipping to change at line 582
Figure 5: PHONETIC Conversion Example Figure 5: PHONETIC Conversion Example
2.3.16. PID 2.3.16. PID
The PID parameter (Section 5.5 of [RFC6350]) converts to the The PID parameter (Section 5.5 of [RFC6350]) converts to the
vCardParams property; see Section 2.15.2. vCardParams property; see Section 2.15.2.
2.3.17. PREF 2.3.17. PREF
The PREF parameter (Section 5.3 of [RFC6350]) converts to the pref The PREF parameter (Section 5.3 of [RFC6350]) converts to the pref
property of that JSContact object, to which the vCard property having property of the derived JSContact object.
this parameter converts.
2.3.18. PROP-ID 2.3.18. PROP-ID
The PROP-ID parameter (Section 4.7 of [RFC9554]) converts to the Id- The PROP-ID parameter (Section 4.7 of [RFC9554]) converts to the Id-
typed key of the JSContact object, to which the vCard property having typed key of the JSContact object, to which the vCard property having
this parameter converts. this parameter converts.
TEL;PROP-ID=PHONE-A;VALUE=uri;PREF=1;TYPE="voice,home" TEL;PROP-ID=PHONE-A;VALUE=uri;PREF=1;TYPE="voice,home"
:tel:+1-555-555-5555;ext=5555 :tel:+1-555-555-5555;ext=5555
TEL;PROP-ID=PHONE-B;VALUE=uri;TYPE=home TEL;PROP-ID=PHONE-B;VALUE=uri;TYPE=home
skipping to change at line 890 skipping to change at line 889
If the JSCOMPS parameter is not set, then the Name object's isOrdered If the JSCOMPS parameter is not set, then the Name object's isOrdered
property value is "false", and the defaultSeparator property MUST NOT property value is "false", and the defaultSeparator property MUST NOT
be set. The order in the components property MUST follow the order be set. The order in the components property MUST follow the order
of values in the N structured value when read from left to right. 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 If the SORT-AS parameter is set, then its structured value converts
to the Name object's sortAs property according to Table 1. An empty to the Name object's sortAs property according to Table 1. An empty
or non-existent component value indicates that no sort is defined for or non-existent component value indicates that no sort is defined for
this kind. this kind.
N;SORT-AS="Stevenson,John Philip":Stevenson;John;Philip,Paul;Dr.;Jr.,M.D.,A.C.P.;;Jr. N;SORT-AS="Stevenson,John Philip":
Stevenson;John;Philip,Paul;Dr.;Jr.,M.D.,A.C.P.;;Jr.
"name": { "name": {
"components":[ "components":[
{ "kind": "surname", "value": "Stevenson" }, { "kind": "surname", "value": "Stevenson" },
{ "kind": "given", "value": "John" }, { "kind": "given", "value": "John" },
{ "kind": "given2", "value": "Philip" }, { "kind": "given2", "value": "Philip" },
{ "kind": "given2", "value": "Paul" }, { "kind": "given2", "value": "Paul" },
{ "kind": "title", "value": "Dr." }, { "kind": "title", "value": "Dr." },
{ "kind": "credential", "value": "M.D." }, { "kind": "credential", "value": "M.D." },
{ "kind": "credential", "value": "A.C.P." }, { "kind": "credential", "value": "A.C.P." },
{ "kind": "generation", "value": "Jr." } { "kind": "generation", "value": "Jr." }
skipping to change at line 1085 skipping to change at line 1085
in Section 2.3. The ADR-specific values of the TYPE parameter in Section 2.3. The ADR-specific values of the TYPE parameter
defined in Sections 5.1 and 5.2 of [RFC9554] convert to the defined in Sections 5.1 and 5.2 of [RFC9554] convert to the
corresponding entries of the contexts property as defined in corresponding entries of the contexts property as defined in
Section 2.5.1 of [RFC9553]. Section 2.5.1 of [RFC9553].
The ALTID and LANGUAGE parameters convert according to the rules The ALTID and LANGUAGE parameters convert according to the rules
defined in Section 2.3. Each possible language-dependent alternative defined in Section 2.3. Each possible language-dependent alternative
converts to an entry of the PatchObject where the key references the converts to an entry of the PatchObject where the key references the
full property. full property.
ADR;TYPE=work;CC=US:;;54321 Oak St;Reston;VA;20190;USA;;;;54321;Oak St;;;;;; ADR;TYPE=work;CC=US:
;;54321 Oak St;Reston;VA;20190;USA;;;;54321;Oak St;;;;;;
"addresses": { "addresses": {
"ADDR-1" : { "ADDR-1" : {
"contexts": { "work": true }, "contexts": { "work": true },
"components": [ "components": [
{ "kind": "number", "value": "54321" }, { "kind": "number", "value": "54321" },
{ "kind": "name", "value": "Oak St" }, { "kind": "name", "value": "Oak St" },
{ "kind": "locality", "value": "Reston" }, { "kind": "locality", "value": "Reston" },
{ "kind": "region", "value": "VA" }, { "kind": "region", "value": "VA" },
{ "kind": "postcode", "value": "20190" }, { "kind": "postcode", "value": "20190" },
{ "kind": "country", "value": "USA" } { "kind": "country", "value": "USA" }
skipping to change at line 2186 skipping to change at line 2187
component and the honorific suffix component only counts component and the honorific suffix component only counts
once. once.
- A value in the ADR property street address component does - A value in the ADR property street address component does
not count if the ADR property value contains a value in one not count if the ADR property value contains a value in one
of the new components defined in [RFC9554]. of the new components defined in [RFC9554].
- All other values count once each. - All other values count once each.
Format definition: Format definition:
jscomps-param = "JSCOMPS" "=" jscomps-param = "JSCOMPS" "=" DQUOTE [jscomps-entry-sep ] ";"
DQUOTE [jscomps-entry-sep ] ";" jscomps-entrylist DQUOTE jscomps-entrylist DQUOTE
jscomps-entrylist = jscomps-entry *(";" jscomps-entry) jscomps-entrylist = jscomps-entry *(";" jscomps-entry)
jscomps-entry = jscomps-entry-pos / jscomps-entry-sep jscomps-entry = jscomps-entry-pos / jscomps-entry-sep
jscomps-entry-pos = 1*DIGIT [ "," 1*DIGIT ] jscomps-entry-pos = 1*DIGIT [ "," 1*DIGIT ]
jscomps-entry-sep = "s" "," jscomps-entry-verb jscomps-entry-sep = "s" "," jscomps-entry-verb
jscomps-entry-verb = *QSAFE-CHAR ; encode special characters according to RFC 6868 jscomps-entry-verb = *QSAFE-CHAR ; encode according to RFC 6868
Example(s): The following example demonstrates the use of positional Example(s): The following example demonstrates the use of positional
entries for the name "Jane Doe". The given name is ordered before entries for the name "Jane Doe". The given name is ordered before
the surname. No secondary index is required for either positional the surname. No secondary index is required for either positional
because both are zero. because both are zero.
"name": { "name": {
"components": [ "components": [
{ "kind": "given", "value": "Jane" }, { "kind": "given", "value": "Jane" },
{ "kind": "surname", "value": "Doe" } { "kind": "surname", "value": "Doe" }
skipping to change at line 2228 skipping to change at line 2229
"components": [ "components": [
{ "kind": "given", "value": "John" }, { "kind": "given", "value": "John" },
{ "kind": "given2", "value": "Philip" }, { "kind": "given2", "value": "Philip" },
{ "kind": "given2", "value": "Paul" }, { "kind": "given2", "value": "Paul" },
{ "kind": "surname", "value": "Stevenson" }, { "kind": "surname", "value": "Stevenson" },
{ "kind": "generation", "value": "Jr." }, { "kind": "generation", "value": "Jr." },
{ "kind": "credential", "value": "M.D." } { "kind": "credential", "value": "M.D." }
], ],
"isOrdered": true "isOrdered": true
} }
N;JSCOMPS=";1;2;2,1;0;6;4,1":Stevenson;John;Philip,Paul;;Jr.,M.D.;;Jr. N;JSCOMPS=";1;2;2,1;0;6;4,1":
Stevenson;John;Philip,Paul;;Jr.,M.D.;;Jr.
Figure 52: Example of Positional Entries Figure 52: Example of Positional Entries
The following example demonstrates the use of separator entries The following example demonstrates the use of separator entries
for the (shortened for brevity) address "54321 Oak St, Reston". for the (shortened for brevity) address "54321 Oak St, Reston".
The first entry defines the default separator to be ", ". The The first entry defines the default separator to be ", ". The
second and fourth positional entries are separated with the second and fourth positional entries are separated with the
separator value " ". For backwards compatibility, the street separator value " ". For backwards compatibility, the street
address component of the ADR property contains both the street address component of the ADR property contains both the street
number and name, but it is not referred to in the JSCOMPS number and name, but it is not referred to in the JSCOMPS
skipping to change at line 2253 skipping to change at line 2255
"components": [ "components": [
{ "kind": "number", "value": "54321" }, { "kind": "number", "value": "54321" },
{ "kind": "separator", "value": " " }, { "kind": "separator", "value": " " },
{ "kind": "name", "value": "Oak St" }, { "kind": "name", "value": "Oak St" },
{ "kind": "locality", "value": "Reston" } { "kind": "locality", "value": "Reston" }
], ],
"defaultSeparator": ", ", "defaultSeparator": ", ",
"isOrdered": true "isOrdered": true
} }
} }
ADR;JSCOMPS="s,\, ;11;s, ;10;3":;;54321 Oak St;Reston;;;;;;;Oak St;54321;;;;;; ADR;JSCOMPS="s,\, ;11;s, ;10;3":
;;54321 Oak St;Reston;;;;;;;Oak St;54321;;;;;;
Figure 53: Example of Separator Entries Figure 53: Example of Separator Entries
3.3.2. JSPTR 3.3.2. JSPTR
Parameter name: JSPTR Parameter name: JSPTR
Purpose: This parameter is set on a JSPROP (Section 3.2.1) property. Purpose: This parameter is set on a JSPROP (Section 3.2.1) property.
Its value is a JSON pointer [RFC6901] that points to the JSContact Its value is a JSON pointer [RFC6901] that points to the JSContact
property that has the value of the JSPROP property. property that has the value of the JSPROP property.
 End of changes. 9 change blocks. 
11 lines changed or deleted 14 lines changed or added

This html diff was produced by rfcdiff 1.48.