Re: [VCARDDAV] JSON representation

"Raghurama Bhat (ragbhat)" <ragbhat@cisco.com> Thu, 07 June 2012 19:07 UTC

Return-Path: <ragbhat@cisco.com>
X-Original-To: vcarddav@ietfa.amsl.com
Delivered-To: vcarddav@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 24BDB21F8731 for <vcarddav@ietfa.amsl.com>; Thu, 7 Jun 2012 12:07:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.268
X-Spam-Level:
X-Spam-Status: No, score=-8.268 tagged_above=-999 required=5 tests=[AWL=1.732, BAYES_00=-2.599, J_CHICKENPOX_61=0.6, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7KGvyOP3hoRW for <vcarddav@ietfa.amsl.com>; Thu, 7 Jun 2012 12:07:39 -0700 (PDT)
Received: from mtv-iport-1.cisco.com (mtv-iport-1.cisco.com [173.36.130.12]) by ietfa.amsl.com (Postfix) with ESMTP id 5FC2F21F872E for <vcarddav@ietf.org>; Thu, 7 Jun 2012 12:07:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=ragbhat@cisco.com; l=3427; q=dns/txt; s=iport; t=1339096059; x=1340305659; h=mime-version:content-transfer-encoding:subject:date: message-id:in-reply-to:references:from:to:cc; bh=rwexom6Y9CKjjOfxEPINMPMS8X3T3sKyLW8Jc2sYIs4=; b=Z1gMI8vfcUzH9/zZrYkaEdcxj0odwi6k4gYgXh/rKz9Q5eaPU+LdGqYK k2VjTFpjDgW7CjX/fcTTPOSH1gpp1HtVPt3Z3Rh7zUpHzrGCs5fY5QvxY DYyW11Bv01FudkylrGmaldaTu50MSqNQVO48Siczo3vRR/o6CoWX4JbT2 Y=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AgAFAJL70E+rRDoG/2dsb2JhbABFtCuBB4IYAQEBAwEBAQEPARQJCjQLBQcEAgEIEQQBAQEKBhcBBgEmHwkIAQEEARIIGodkBAELmS+XUIgpix2FLGADiECNb40CgWaDAA
X-IronPort-AV: E=Sophos;i="4.75,732,1330905600"; d="scan'208";a="44964359"
Received: from mtv-core-1.cisco.com ([171.68.58.6]) by mtv-iport-1.cisco.com with ESMTP; 07 Jun 2012 19:07:39 +0000
Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by mtv-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id q57J7d18004018; Thu, 7 Jun 2012 19:07:39 GMT
Received: from xmb-sjc-21d.amer.cisco.com ([171.70.151.140]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 7 Jun 2012 12:07:38 -0700
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Date: Thu, 07 Jun 2012 12:07:37 -0700
Message-ID: <93E73285DA3584449E2CD5E9414E16C3038555B4@xmb-sjc-21d.amer.cisco.com>
In-Reply-To: <4FD0DB04.6040604@viagenie.ca>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [VCARDDAV] JSON representation
Thread-Index: Ac1EzTC1wpaWqzYdSHKr9dwurQk2rQAEfwBw
References: <4FCFFECA.8010507@stpeter.im> <4FD0C14D.1010406@viagenie.ca><4FD0D27F.5070706@stpeter.im> <4FD0DB04.6040604@viagenie.ca>
From: "Raghurama Bhat (ragbhat)" <ragbhat@cisco.com>
To: Simon Perreault <simon.perreault@viagenie.ca>, Peter Saint-Andre <stpeter@stpeter.im>
X-OriginalArrivalTime: 07 Jun 2012 19:07:38.0910 (UTC) FILETIME=[CE5BD3E0:01CD44E0]
Cc: vcarddav@ietf.org
Subject: Re: [VCARDDAV] JSON representation
X-BeenThere: vcarddav@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: IETF vcarddav wg mailing list <vcarddav.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/vcarddav>, <mailto:vcarddav-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/vcarddav>
List-Post: <mailto:vcarddav@ietf.org>
List-Help: <mailto:vcarddav-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/vcarddav>, <mailto:vcarddav-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Jun 2012 19:07:40 -0000

------------------------------------------------------------------------
-----------------------------------------
The gender examples from vCard could be expressed like this:
     GENDER:M
      GENDER:F
      GENDER:M;Fellow
      GENDER:F;grrrl
      GENDER:O;intersex
      GENDER:;it's complicated

"gender": "M"
"gender": "F"
"gender": ["M", "Fellow"]
"gender": ["F", "grrrl"]
"gender": ["O", "intersex"]
"gender": ["", "it's complicated"]
------------------------------------------------------------------------
-----------------------------------------
I like the simplicity for the simple case, but aren't we losing some
information in cases 3-6 above? You would not know which one is the
value and which one is the parameter unless you rely on order.  I don't
believe JSON converters are required to preserve order.

Thanks,

--Raghu

-----Original Message-----
From: vcarddav-bounces@ietf.org [mailto:vcarddav-bounces@ietf.org] On
Behalf Of Simon Perreault
Sent: Thursday, June 07, 2012 9:47 AM
To: Peter Saint-Andre
Cc: vcarddav@ietf.org
Subject: Re: [VCARDDAV] JSON representation

On 2012-06-07 12:10, Peter Saint-Andre wrote:
>>>         "gender": { "sex" : "M" },
>>
>> This is super ugly. I know that's how it is in xCard, but xCard is 
>> what it is and is super ugly in various other ways. It would be nice 
>> if we could have simply:
>>
>> "gender": "M"
>
> I like the simplicity, but I wonder if we're losing information. Would

> you suggest that we do the same thing for all properties? For example:
>
> "bday": "--0203"
>
> "anniversary": "20090808T1430-0500"

bday and anniversary are different from gender. They are single
date-and-or-time values by default. Whereas gender is a compound
property.

The gender examples from vCard could be expressed like this:

      GENDER:M
      GENDER:F
      GENDER:M;Fellow
      GENDER:F;grrrl
      GENDER:O;intersex
      GENDER:;it's complicated

"gender": "M"
"gender": "F"
"gender": ["M", "Fellow"]
"gender": ["F", "grrrl"]
"gender": ["O", "intersex"]
"gender": ["", "it's complicated"]

or even possibly:
"gender": "it's complicated"

You can see I'm not arguing for regularity...

>>>         "org": {
>>>             "type": "work",
>>>             "text": "Viagenie"
>>>         },
>>
>> Shouldn't this be
>>
>>         "org": {
>>             "type": "work",
>>             "text": ["Viagenie"]
>>         },
>>
>> ?
>>
>> I hope not. What you have is fine. But it needs justification.
>
> Why would use an array (an ordered collection of values) when there is

> only one value? We were aiming for simplicity.

I guess regularity would dictate using an array even for a single value
because there is the possibility of multiple values...

>> Maybe add an IANA consideration to the effect that in the future 
>> parameter names and value type names must not clash?
>
> Wouldn't that belong in rfc6350bis?

Yes, but if jCard depends on it then maybe it would be quicker to just
add it to jCard.

Simon
--
DTN made easy, lean, and smart --> http://postellation.viagenie.ca
NAT64/DNS64 open-source        --> http://ecdysis.viagenie.ca
STUN/TURN server               --> http://numb.viagenie.ca
_______________________________________________
VCARDDAV mailing list
VCARDDAV@ietf.org
https://www.ietf.org/mailman/listinfo/vcarddav