Subject: [Jcardcal] Conversion of value type between vCard and jCard

From: Bert Greevenbosch <[email-masked]>
Date: Mon, 26 Aug 2013 01:59:14 +0000

Hi all,

Below a comment from Barry.

I think the new text is OK, but it would require proper usage of "value type" and "type identifier". Here is my edit:

BEGIN

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

1. If the property has a "VALUE" parameter, that parameter's value is used as the value type. 
2. If the property has no "VALUE" parameter but has a default value type, the default value type is used. 
3. If the property has no "VALUE" parameter and has no default value type, "unknown" is used.

Converting from jCard into vCard is done as follows:

1. If the property's value type is "unknown", no "VALUE" parameter is included. 
2. If the property's value type is the default type for that property, no "VALUE" parameter is included. 
3. Otherwise, a "VALUE" parameter is included, and the value type is used as the parameter value. 

See Section 5 for information on handling unknown value types.

END;

What do you think?

Best regards,
Bert

--- Barry's comment ---

In Section 3.3.1, I don't think you make it at all clear what you have to do to
create the third array element. Maybe something like this?:

OLD

vCard defines a "VALUE" property parameter (Section 5.2 of
[RFC6350]). This property parameter MUST NOT be added to the
parameters object. Instead, the value type is always explicitly
mentioned in the third element of the array describing the property.
Thus, when converting from vCard to jCard, any "VALUE" property
parameters are skipped. When converting from jCard into vCard, the
appropriate "VALUE" property parameter MUST be included in the vCard
property if the value type is not "unknown" or the default value type
for that property. See Section 5 for information on handling unknown
value types.

NEW

vCard defines a "VALUE" property parameter (Section 5.2 of
[RFC6350]). This property parameter MUST NOT be added to the
parameters object. Instead, the value type is encoded as the
third element of the array describing the property. When converting
a property from vCard to jCard, the value type is determined as
follows:

1. If the property has a "VALUE" parameter, that parameter's value is used as the type. 
2. If the property has no "VALUE" parameter but has a default type, the default type is used. 
3. If the property has no "VALUE" parameter and has no default type, "unknown" is used. 

Converting from jCard into vCard is done as follows:

1. If the property's value type is "unknown", no "VALUE" parameter is included. 
2. If the property's value type is the default type for that property, no "VALUE" parameter is included. 
3. Otherwise, a "VALUE" parameter is included, and the value type is used as the parameter value. 

See Section 5 for information on handling unknown value types.

END