Re: [Jcardcal] Integers in jCard

Michael Angstadt <mike.angstadt@gmail.com> Mon, 02 September 2013 13:29 UTC

Return-Path: <mike.angstadt@gmail.com>
X-Original-To: jcardcal@ietfa.amsl.com
Delivered-To: jcardcal@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8C6D621F9DED for <jcardcal@ietfa.amsl.com>; Mon, 2 Sep 2013 06:29:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.363
X-Spam-Level:
X-Spam-Status: No, score=-1.363 tagged_above=-999 required=5 tests=[AWL=-0.930, BAYES_00=-2.599, FF_IHOPE_YOU_SINK=2.166, HTML_MESSAGE=0.001, NO_RELAYS=-0.001]
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 fTAktqXjGUkF for <jcardcal@ietfa.amsl.com>; Mon, 2 Sep 2013 06:29:50 -0700 (PDT)
Received: from mail-pb0-x22c.google.com (mail-pb0-x22c.google.com [IPv6:2607:f8b0:400e:c01::22c]) by ietfa.amsl.com (Postfix) with ESMTP id B3FFB21F9DD5 for <jcardcal@ietf.org>; Mon, 2 Sep 2013 06:29:50 -0700 (PDT)
Received: by mail-pb0-f44.google.com with SMTP id xa7so4766902pbc.17 for <jcardcal@ietf.org>; Mon, 02 Sep 2013 06:29:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AXHQ2hJ498lBdMCMzhT4NvZRPm10T9+PJWdXM18Pho8=; b=rVSG5ZeVxNbMCdH9gHscU3BFA6aiJxCNdlxVVfXYdHzw4bVimu5buEUr6XevXJ7WNa XeZaQqj6fcTYsHl8o7q3IcwhUPmyEXL10jCmYubhLosCNKWQexT69neDet8kbTyYBTmE RpXSojL88lL5zhRK6bkal9xrfziMovjolvApA1QA9JJgiZopyLSe4NflsiI95RipI5Fz r72njwPMVnnu9OkM6F6/MoqXm7bSWEHGMaQQKqJGI4ijMxzg16pda1SFkMLTv4uWPxPi QhuKXdhrHKLmloo+O5zCl4WoAkcT9MQ5f2tMmDilTyUkeREqg14eCqeXrLrlTLdh+Cql lI/A==
MIME-Version: 1.0
X-Received: by 10.68.182.225 with SMTP id eh1mr2089374pbc.172.1378128590455; Mon, 02 Sep 2013 06:29:50 -0700 (PDT)
Received: by 10.68.240.5 with HTTP; Mon, 2 Sep 2013 06:29:50 -0700 (PDT)
In-Reply-To: <46A1DF3F04371240B504290A071B4DB63D8592BC@szxeml558-mbx.china.huawei.com>
References: <46A1DF3F04371240B504290A071B4DB63D81DF12@szxeml558-mbx.china.huawei.com> <CAJNb_g3CayLmmvXpN7Qz=LwnwCPRdcXrs7G-m9o59PR8ChxLmQ@mail.gmail.com> <46A1DF3F04371240B504290A071B4DB63D8592BC@szxeml558-mbx.china.huawei.com>
Date: Mon, 02 Sep 2013 09:29:50 -0400
Message-ID: <CAJNb_g0zu1hTBG=3+rqj78oXY1M+oUVhB57vRbnPE4Duy5VWSQ@mail.gmail.com>
From: Michael Angstadt <mike.angstadt@gmail.com>
To: Bert Greevenbosch <Bert.Greevenbosch@huawei.com>
Content-Type: multipart/alternative; boundary="047d7ba9725016caf604e56691e1"
Cc: Barry Leiba <barryleiba@computer.org>, Philipp Kewisch <kewisch@gmail.com>, "jcardcal@ietf.org" <jcardcal@ietf.org>
Subject: Re: [Jcardcal] Integers in jCard
X-BeenThere: jcardcal@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: JSON data formats for vCard and iCalendar WG <jcardcal.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jcardcal>, <mailto:jcardcal-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/jcardcal>
List-Post: <mailto:jcardcal@ietf.org>
List-Help: <mailto:jcardcal-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jcardcal>, <mailto:jcardcal-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Sep 2013 13:29:51 -0000

The header of each section does include a reference to the corresponding
section of the vCard specification.  Is that enough?  I agree that these
limitations are unlikely to be encountered in the majority of use-cases.

Mike


On Sun, Sep 1, 2013 at 10:19 PM, Bert Greevenbosch <
Bert.Greevenbosch@huawei.com> wrote:

> Hi all,
>
> @Michael: thanks for pointing out the issue with floats. Indeed floats may
> require conversion too.
>
> There may be some problems with the conversion though. For example, it
> seems hard to convert a floating point number 3.456*10^-127 to a form
> without exponential. It is quite interesting to note that the vCard
> specification RFC 6350 forbids usage of exponentials (scientific notation),
> but at the same time requires similar precision as binary64.
>
> This does not hold for huge integers, such as 2.84*10^127, as RFC 6350
> gives explicit boundaries for integers (9223372036854775807 to
> -9223372036854775808) and the converter can break off and output an error
> in case these boundaries are not obeyed. With integers an issue could be a
> "false integer", which is actually a non-integer number with "integer"
> value type.
>
> So I guess the jCard to vCard converter needs to make some decisions on
> which values are acceptable, and for which values it should abort the
> conversion and generate an error. It may need to round values to a certain
> precision, in which case there would be some semantic loss. I have the
> suspicion that this is more a theoretical problem than a practical problem,
> as in practice arbitrary precision or number height may not be required.
> However, something could have gone wrong (whether or not on purpose), and
> implementations should be ready for this.
>
> Before I propose some extra text on this, I would like to gather related
> opinions?
>
> Thanks and best regards,
> Bert
>
>
> ---
> From: Michael Angstadt [mailto:mike.angstadt@gmail.com]
> Sent: 2013年8月30日 20:59
> To: Bert Greevenbosch
> Cc: jcardcal@ietf.org; Barry Leiba; Philipp Kewisch
> Subject: Re: [Jcardcal] Integers in jCard
>
>
> On Thu, Aug 29, 2013 at 10:12 PM, Bert Greevenbosch <
> Bert.Greevenbosch@huawei.com> wrote:
> To me, it seems impractical to forbid using decimals and exponents for
> jCard integers. A general JSON parser (which is oblivious of jCard) would
> ignore any such requirement anyway.
>
> Agreed.  A similar statement should be added to the "float" section
> (3.4.10) about permitting exponents to be used.
>
> BEGIN
>   Note: Neither JSON nor jCard prohibits using exponents to form
>   a float number. However, since vCard does not support
>   exponents in floats, any exponents MUST be eliminated when
>   converting a "float" value type property from jCard to vCard.
> END;
>
> Perhaps these changes should be applied to the jCal draft as well, since
> jCal also defines "integer" and "float" data types.
> _______________________________________________
> jcardcal mailing list
> jcardcal@ietf.org
> https://www.ietf.org/mailman/listinfo/jcardcal
>