Re: [Json] {"Height": 125, "Width": "100"} example

Tim Bray <tbray@textuality.com> Thu, 10 October 2013 04:56 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 87DAC21F8578 for <json@ietfa.amsl.com>; Wed, 9 Oct 2013 21:56:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.771
X-Spam-Level:
X-Spam-Status: No, score=-2.771 tagged_above=-999 required=5 tests=[AWL=0.205, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-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 HeoEuQyrtS+l for <json@ietfa.amsl.com>; Wed, 9 Oct 2013 21:55:59 -0700 (PDT)
Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by ietfa.amsl.com (Postfix) with ESMTP id 2204811E81BA for <json@ietf.org>; Wed, 9 Oct 2013 21:55:58 -0700 (PDT)
Received: by mail-vb0-f48.google.com with SMTP id w16so1232928vbf.35 for <json@ietf.org>; Wed, 09 Oct 2013 21:55:58 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ut2vfvhyVgyQgsi189p/vgvCVu7QnHt/Y/vHtI3GDgg=; b=jgwUjuOFw9i7QbTEXxMkeNab9uC5GZe2LPkE8OqEuUxhAZK/gCkK3AWQ3B+rOfz7/j 4HaJ/JhYZK5dtxjBKt+xruGGhrrvYqJ7Xskm9OVN0VKhk/Wsqmqd6fW7APkUZd/j5S6F uf2XO9qNttxzvHW6vbAqz3bgcp5Rn+OpoDN99X41JhHevRhRWwFWAshMzEPC/N/8zlO7 El6g0TNaNZqbRiQZXk20/fWxv8yCyZJFtKSYPmZIckjGuyAejXxn4eYuB1dxVOxQxiBW lR8JahfBhvB6/07mlGY5mSdaKfHXnnF3n49SrEdtWisi3Ye2baZD+l9XmvnR+qrq7dtW tbJQ==
X-Gm-Message-State: ALoCoQk/UMcILyLsltkkM0N279tZwD7XWKfmUUUTNLnPYhEMNoA/mYnM2F5M0KgPX1QuXv6ZvvoS
MIME-Version: 1.0
X-Received: by 10.52.236.196 with SMTP id uw4mr3016209vdc.96.1381380958486; Wed, 09 Oct 2013 21:55:58 -0700 (PDT)
Received: by 10.220.174.197 with HTTP; Wed, 9 Oct 2013 21:55:58 -0700 (PDT)
X-Originating-IP: [24.84.235.32]
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E11531CC024B@WSMSG3153V.srv.dir.telstra.com>
References: <255B9BB34FB7D647A506DC292726F6E11531CC024B@WSMSG3153V.srv.dir.telstra.com>
Date: Wed, 9 Oct 2013 21:55:58 -0700
Message-ID: <CAHBU6itKOO94etcQiVYrrjUZw0sKEx6k+sp8c1t5NaSbBUnDWw@mail.gmail.com>
From: Tim Bray <tbray@textuality.com>
To: "Manger, James H" <James.H.Manger@team.telstra.com>
Content-Type: multipart/alternative; boundary=089e0117622754970204e85bd133
Cc: "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] {"Height": 125, "Width": "100"} example
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: Thu, 10 Oct 2013 04:56:04 -0000

Don’t know if it’s a typo, but it’s kind of charmingly idiosyncratic and
has lasted all these years... let’s spare it.


On Wed, Oct 9, 2013 at 6:03 PM, Manger, James H <
James.H.Manger@team.telstra.com> wrote:

> 4627 and 4627bis include an example with the following object members:
>   {
>     "Height": 125,
>     "Width":  "100"
>   },
>
> This looks like a typo ("100" instead of 100), but it is still valid JSON.
>
> Is this a typo (that -bis should correct)?
> Or is this a subtle suggestion to JSON parsers that they should
> automatically
> try to convert strings to numbers if an app asks for, say, the "Width"
> field
> as an int but the parser finds a string in the JSON?
>
> --
> James Manger
>
>
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>