Re: [Json] "best practices" Vs. Profile for i-json

Nico Williams <nico@cryptonector.com> Mon, 04 August 2014 18:02 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 261121A00DF for <json@ietfa.amsl.com>; Mon, 4 Aug 2014 11:02:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.666
X-Spam-Level:
X-Spam-Status: No, score=-1.666 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ggrHEuwMsvaX for <json@ietfa.amsl.com>; Mon, 4 Aug 2014 11:02:01 -0700 (PDT)
Received: from homiemail-a85.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id A3DB91A00DD for <json@ietf.org>; Mon, 4 Aug 2014 11:01:57 -0700 (PDT)
Received: from homiemail-a85.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a85.g.dreamhost.com (Postfix) with ESMTP id 73516BBA06B; Mon, 4 Aug 2014 11:01:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=+dsmvJ/pTfXSk0 G/hHojokTDeaQ=; b=vYDLpOp0gzgijjs5VRMMytieix2PDGjSunNgsJvGd++nnR pZNr9TQZq/HAvbBQLoGCWJORZ2oSW+1rJqt50FDQp2qag1FOIdn0HfpNQREd6B2E CjpXfXsiCnxovVilyo62qFsEr/e04JXtz6qsSpB0ZNPNuA4arCvS69HcmFdSY=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a85.g.dreamhost.com (Postfix) with ESMTPA id 0C6D3BBA063; Mon, 4 Aug 2014 11:01:56 -0700 (PDT)
Date: Mon, 04 Aug 2014 13:01:56 -0500
From: Nico Williams <nico@cryptonector.com>
To: John Cowan <cowan@mercury.ccil.org>
Message-ID: <20140804180155.GP3579@localhost>
References: <2d53157574f749e0b1399b9e39564ecd@BL2PR02MB307.namprd02.prod.outlook.com> <CA+mHimPoZzmoio0Y+JgUDHd4b9B4yPm9fc3a1SCV6tayJ_9z7A@mail.gmail.com> <20140804165506.GL3579@localhost> <20140804174749.GE28851@mercury.ccil.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20140804174749.GE28851@mercury.ccil.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: http://mailarchive.ietf.org/arch/msg/json/Xe-UV1H3HNJFre9znEy_EDjFEgs
Cc: Stephen Dolan <stephen.dolan@cl.cam.ac.uk>, Larry Masinter <masinter@adobe.com>, IETF JSON WG <json@ietf.org>
Subject: Re: [Json] "best practices" Vs. Profile for i-json
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 04 Aug 2014 18:02:06 -0000

On Mon, Aug 04, 2014 at 01:47:49PM -0400, John Cowan wrote:
> Nico Williams scripsit:
> 
> > Is a MUST really needed?  Suppose you have an encoder that produces
> > numbers (not irrationals) that require better-than-IEEE754 to represent
> > exactly.  A parser that can only handle IEEE754 should accept such
> > numbers, but with loss of precision/range -- exactly what we already
> > knew to expect from JSON as far as interoperability goes.
> 
> A fair point.  We can use the verbal formula employed by Unicode for
> normalization, something like this:
> 
>    A sending implementation [MUST NOT/SHOULD NOT] expect a receiving
>    implementation to distinguish between two numeric literals whose
>    decimal values round to the same IEEE754 double-precision value
>    (using standard round-to-nearest, ties-to-even rounding).
> 
> How's that?

Perfect.  Make that a MUST NOT.  Do we need a requirement/recommendation
that parsers implement at least IEEE754?

Nico
--