Re: [Json] Limitations on number size?

Tim Bray <tbray@textuality.com> Wed, 05 June 2013 16:06 UTC

Return-Path: <tbray@textuality.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 98F7121F9B33 for <json@ietfa.amsl.com>; Wed, 5 Jun 2013 09:06:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.48
X-Spam-Level:
X-Spam-Status: No, score=0.48 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FH_RELAY_NODNS=1.451, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_PBL=0.905, RDNS_NONE=0.1]
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 8AFs6s-jiarn for <json@ietfa.amsl.com>; Wed, 5 Jun 2013 09:06:11 -0700 (PDT)
Received: from mail-la0-x234.google.com (mail-la0-x234.google.com [IPv6:2a00:1450:4010:c03::234]) by ietfa.amsl.com (Postfix) with ESMTP id 97BE921F9B7E for <json@ietf.org>; Wed, 5 Jun 2013 09:05:56 -0700 (PDT)
Received: by mail-la0-f52.google.com with SMTP id fo13so1585654lab.25 for <json@ietf.org>; Wed, 05 Jun 2013 09:05:52 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=1BJ0TDWkIiCWeMbsO5ola+luMHXMQw12p3na72pEDbo=; b=cpHNgdwwVVq8FwPMrkGxVX4tVVY0iz4m2RRHRJufj2mzCrPVNc7OdCCXXFpqlxbAhP emeojRyPbvNu7I+eu8eH04NhEJ/J20FHAlOUiIwI/a/qD5vcG/S11Yq+iOKMynE19Nih aCJq/TqSJ7iNGpoVZEAm5U9+GU9znjL9QWWw5KRCNrdFQ6WYysnB4Hk67KZc++4yf5cr ud1b5IhOnBfb8lG1zTTksoOJ4kD2+TF++QQogeKh77DUznbPYcFiZHlj8P9JzzBymGo0 sWhL74iJkLtruaZLL9ZUgTEN/iyISrooQMrPenhyFv3ze2/zI7leYexiM4Cwb6QjiMZH 2v+g==
MIME-Version: 1.0
X-Received: by 10.112.35.165 with SMTP id i5mr15534134lbj.17.1370448352394; Wed, 05 Jun 2013 09:05:52 -0700 (PDT)
Received: by 10.114.83.232 with HTTP; Wed, 5 Jun 2013 09:05:52 -0700 (PDT)
X-Originating-IP: [24.114.41.137]
Received: by 10.114.83.232 with HTTP; Wed, 5 Jun 2013 09:05:52 -0700 (PDT)
In-Reply-To: <3B8F8F96-F7B6-4734-9553-087A993482A4@tzi.org>
References: <CAK3OfOgPGi4PKxKAGEG=PCv-xaszMqWpUUUH2B9f0UaeMMO1gQ@mail.gmail.com> <C42654A3-E218-45A8-B368-4A60CB89619D@vpnc.org> <C4D8E604-E4F8-408B-B7DD-97226300C212@tzi.org> <CAK3OfOjDp=S=HZ5LTP3L+rqq1VjhSShakmBOJD9aPiN8fSULKw@mail.gmail.com> <C30B2D0D-75A7-49A5-A190-5AD5DC1FCDCC@vpnc.org> <3B8F8F96-F7B6-4734-9553-087A993482A4@tzi.org>
Date: Wed, 5 Jun 2013 09:05:52 -0700
Message-ID: <CAHBU6ivXhPjpcqmg3f46b4uuRnQyDigfwKtK+CUbX9Lgp6qZWA@mail.gmail.com>
From: Tim Bray <tbray@textuality.com>
To: Carsten Bormann <cabo@tzi.org>
Content-Type: multipart/alternative; boundary=001a11c36c8c3a574004de6a5ffe
X-Gm-Message-State: ALoCoQmaN4RNTum8MqqlQUPTiO4xqND/52w++5E7/P1RIXkakvvC0EQE3tLlHgMGZS/DUdVQsFmI
Cc: Paul Hoffman <paul.hoffman@vpnc.org>, json@ietf.org
Subject: Re: [Json] Limitations on number size?
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
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: Wed, 05 Jun 2013 16:06:21 -0000

-1

Superfluous. The spec is perfectly clear on number representations.

Once again, in scope for a best-practices doc.
-T
On Jun 5, 2013 8:52 AM, "Carsten Bormann" <cabo@tzi.org> wrote:

> On Jun 4, 2013, at 16:07, Paul Hoffman <paul.hoffman@vpnc.org> wrote:
>
> > And this is the point where one of the chairs says "please suggest
> specific wording changes to RFC 4627".
>
> I like Tim's idea of a separate "best practices" document and look
> forward to the process of creating it (Popcorn!).  However, some
> things need to be said in the specification.  Here's my take:
>
> <NEW>
> Relationship between JSON and JavaScript
>
> As the name implies, JSON was defined using the literal notation the
> JavaScript language uses for its data objects; some restrictions were
> made to make it more robust to potential changes in the JavaScript
> language.  With that derivation made, JSON is now a specification
> separate from JavaScript.
>
> Properties of JavaScript (and changes to the JavaScript specification
> [ECMAscript]) do not automatically transfer to JSON.  For example,
> considerations about the source character set for JavaScript programs
> do not influence what is admissible in a JSON document.  Another
> example is the number format: JSON can represent numbers in arbitrary
> precision by just supplying the necessary number of decimal digits.
> JavaScript uses a number model derived from IEEE 754 binary double
> precision numbers; the precision and range it can represent natively
> therefore is a subset of the precision and range possible in JSON.
>
> This clear separation of the two specifications does not mean that
> users of JSON can always ignore JavaScript properties: A sizable part
> of the JSON ecosystem is either using JavaScript implementations or
> implementations that have been optimized for interaction with
> JavaScript implementations.  Depending on the area of application, a
> JSON-based protocol may do well to consider JavaScript's specific
> properties.  Discussion of best practices for JSON-based protocols is
> outside the scope of this specification.  Here, we just want to point
> out that, for example, exclusively using numbers natively
> representable in JavaScript is not a requirement of the JSON format.
>
> Grüße, Carsten
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>