Re: [Json] What is a JSON-text? [REVISITED]

Stefan Drees <stefan@drees.name> Thu, 03 October 2013 18:06 UTC

Return-Path: <stefan@drees.name>
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 F0BD621F99DE for <json@ietfa.amsl.com>; Thu, 3 Oct 2013 11:06:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.289
X-Spam-Level:
X-Spam-Status: No, score=-0.289 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_BL_SPAMCOP_NET=1.96]
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 MNsjBoqw4Ig1 for <json@ietfa.amsl.com>; Thu, 3 Oct 2013 11:06:27 -0700 (PDT)
Received: from mout.web.de (mout.web.de [212.227.15.3]) by ietfa.amsl.com (Postfix) with ESMTP id 09A7E21F898A for <json@ietf.org>; Thu, 3 Oct 2013 10:52:03 -0700 (PDT)
Received: from newyork.local.box ([93.129.127.38]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0Lba5z-1W7gGx2zJj-00lDQ3 for <json@ietf.org>; Thu, 03 Oct 2013 19:52:00 +0200
Message-ID: <524DAEBF.1020509@drees.name>
Date: Thu, 03 Oct 2013 19:51:59 +0200
From: Stefan Drees <stefan@drees.name>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
MIME-Version: 1.0
To: Tim Bray <tbray@textuality.com>
References: <BF7E36B9C495A6468E8EC573603ED9411EF2B583@xmb-aln-x11.cisco.com> <CAHBU6iv7gT8nebFnz_mHQVZ3z8Kz+Pb8VRrSkMf44QRqWL8QjA@mail.gmail.com>
In-Reply-To: <CAHBU6iv7gT8nebFnz_mHQVZ3z8Kz+Pb8VRrSkMf44QRqWL8QjA@mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 8bit
X-Provags-ID: V03:K0:KA9SZXvnS4uMSwe/RrqErY7I918V654vlZ6hPtp+I+XNKhpRisH elVJyc9ZDDOOKD7anUkjNAceDr4rQ1k9GKUFdVFwuqvTFl6U+/gIQz5o2ZW9a/t4YKQVJzh a53cy2TJ755dvRdhcRhw88gKlsnGaVDrcAlcdoBdUfsEsL6KVhEYHyfWKYXweQOxZNXe/MP N/5RGhD2mxzaFIMnrLHXQ==
Cc: JSON WG <json@ietf.org>, "Matt Miller (mamille2)" <mamille2@cisco.com>
Subject: Re: [Json] What is a JSON-text? [REVISITED]
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: stefan@drees.name
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, 03 Oct 2013 18:06:54 -0000

On 2013-10-03 19:10 +02:00, Tim Bray wrote:
> I am very strongly against changing the -bis to allow top-level values.
> - It’s a bad practice
> - support for it in popular libraries is very patchy.

Me also very strongly against "non-container" top-level entities.

Additional rationale:
- Add two bytes to wrap the serialized/transported value into array or
   say six bytes and use eg. {"d":my_top_level_value} should be cheap
   for the benefit of producing a JSON-text.

Even if value is king, values like strings, numbers, true, false or null 
just wrapped into "no clothes" make me wonder why one would serialize 
(or forward) them as advertised JSON-text in the first place.

>
> On Thu, Oct 3, 2013 at 9:33 AM, Matt Miller (mamille2)
> <mamille2@cisco.com>wrote:
>
>> Hello all,
>>
>> There appears to be rough consensus to reference ECMA-262 edition 5.1.  As
>> James pointed out[1], something will need to be said about what is a
>> JSON-text; either 4627bis states a difference from ECMA-262 edition 5.1, or
>> 4627bis states a difference from RFC 4627.
>>
>> There was previously much discussion on this topic[2].  Some have restated
>> their support.  What do others think about changing JSON-text to allow any
>> JSON value versus just objects or arrays?
>>
>>
>> -  Paul Hoffman and Matt Miller
>>
>> [1] < http://www.ietf.org/mail-archive/web/json/current/msg01721.html >
>> [2] < http://www.ietf.org/mail-archive/web/json/current/msg00553.html >
>> ...

["Stefan"]