Re: [Json] What is a JSON-text? [REVISITED]
Larry Masinter <masinter@adobe.com> Thu, 03 October 2013 21:19 UTC
Return-Path: <masinter@adobe.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 E3A1C21F8443 for <json@ietfa.amsl.com>; Thu, 3 Oct 2013 14:19:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.999
X-Spam-Level:
X-Spam-Status: No, score=-5.999 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, J_CHICKENPOX_24=0.6, RCVD_IN_DNSWL_MED=-4]
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 fx4gLZxuPINb for <json@ietfa.amsl.com>; Thu, 3 Oct 2013 14:18:54 -0700 (PDT)
Received: from exprod6og126.obsmtp.com (exprod6og126.obsmtp.com [64.18.1.77]) by ietfa.amsl.com (Postfix) with ESMTP id A89AA11E80D1 for <json@ietf.org>; Thu, 3 Oct 2013 14:09:47 -0700 (PDT)
Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob126.postini.com ([64.18.5.12]) with SMTP ID DSNKUk3dFyltxqR5F7UIwO7eQOHyQH4OkZXB@postini.com; Thu, 03 Oct 2013 14:09:47 PDT
Received: from inner-relay-2.corp.adobe.com (mail-321.pac.adobe.com [153.32.1.52]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r93L9f49012810; Thu, 3 Oct 2013 14:09:41 -0700 (PDT)
Received: from nacas02.corp.adobe.com (nacas02.corp.adobe.com [10.8.189.100]) by inner-relay-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id r93L9eOU013133; Thu, 3 Oct 2013 14:09:40 -0700 (PDT)
Received: from nambxv01a.corp.adobe.com ([10.8.189.95]) by nacas02.corp.adobe.com ([10.8.189.100]) with mapi; Thu, 3 Oct 2013 14:09:40 -0700
From: Larry Masinter <masinter@adobe.com>
To: "stefan@drees.name" <stefan@drees.name>, Nico Williams <nico@cryptonector.com>
Date: Thu, 03 Oct 2013 14:09:40 -0700
Thread-Topic: [Json] What is a JSON-text? [REVISITED]
Thread-Index: Ac7AcHhFkHj5CuLSRc6na0igxoKHUQAC4BxQ
Message-ID: <C68CB012D9182D408CED7B884F441D4D34820FD913@nambxv01a.corp.adobe.com>
References: <BF7E36B9C495A6468E8EC573603ED9411EF2B583@xmb-aln-x11.cisco.com> <CAHBU6iv7gT8nebFnz_mHQVZ3z8Kz+Pb8VRrSkMf44QRqWL8QjA@mail.gmail.com> <524DAEBF.1020509@drees.name> <CAK3OfOhRCCfNWHD-qSXOmswE7DL+QFefE_pvQO5g24NJ9q07hg@mail.gmail.com> <524DC3D5.4010806@drees.name>
In-Reply-To: <524DC3D5.4010806@drees.name>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: JSON WG <json@ietf.org>, Tim Bray <tbray@textuality.com>, "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
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 21:19:06 -0000
I think you might make more headway if you think about the primary role of 4627 and 4627bis as registering Internet Media Types. Consider, for example, having two media types text/json and text/json+ the first of which is 4627 compatible, and the second (text/json+) allowing "non-container" top level. Everything that is valid text/json would also be valid text/json+ with the same interpretation. Or, you could keep the same internet media type and just declare it an extension, like image/gif changed for GIF89a. Or Postscript changed and still kept application/postscript. Yes, it's a change, no it fits within the convention of Internet Media Types to accept extensions that are lexically distinguishable. > -----Original Message----- > From: json-bounces@ietf.org [mailto:json-bounces@ietf.org] On Behalf Of > Stefan Drees > Sent: Thursday, October 03, 2013 12:22 PM > To: Nico Williams > Cc: Matt Miller (mamille2); Tim Bray; JSON WG > Subject: Re: [Json] What is a JSON-text? [REVISITED] > > On 2013-10-03 20:24 +02:00, Nico Williams wrote: > > On Thu, Oct 3, 2013 at 12:51 PM, Stefan Drees <stefan@drees.name> wrote: > >> 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. > > > > That's very lame; see below for rationale. > > > >> 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. > > > > Because JSON isn't always used to transport values across networks > > (where it'd be silly to send scalar values with all the overheade of > > HTTP and TCP/IP, say). JSON is often used for interop between local > > components, where the overhead that would make laughable the use of > > scalar values at the top-level just doesn't apply. E.g., the Python > > bindings to libjq. Indeed, here your suggestion that I call "lame" > > *adds* undesirable overhead. > > > > "But JSON is an interchange format for networking" is not a good > > answer to that. It's a good interchange format, full stop. The train > > with JSON used for local interchange purposes left the station. This > > is why parsers commonly have an option to accept scalar values at the > > top-level. > > > ... and no one stops implementers nor users from parametrizing a > parser to adapt to special situations. > > Say there is a document named pi.json that contains the text /3.14/ (but > without the slashes) that may be the (best effort) serialized > representation of the "number" pi or just the first four bytes, as the > file became truncated (or the local message content if you are so > inclined). As a JSON text wraped inside array or object, the situation > would be clear, in the above "unwrapped" case it is not anymore. > > So I think, the above '[...]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.' > remains as it stands, doesn't it? > > Whatever un-"lame" and un-"laughable" ;-) "train has left the station", > I guess that without making "wrapping" mandatory for JSON-text, one > might consider JSON-izing every binary protocol on earth into such an > unwrapped JSON+* channel (by combining the unlimited "number" feature of > the JSON rfc and "interpreting" some representation bilaterally > negotiated as the underlying bit pattern for the stored/transmitted > binary protocol message). > > The set of relations, where one uses JSON as a means to communicate > between otherwise unrelated components, that are on one hand so closely > coupled, that no wrapping is needed, but on the other hand so far apart, > that they cannot accept non JSON-text (as it stands now) looks similar > to the empty set to me, but I am sure, people will let me soon know of > exotic situations ... :-) > > ["Stefan"] > > _______________________________________________ > json mailing list > json@ietf.org > https://www.ietf.org/mailman/listinfo/json
- Re: [Json] What is a JSON-text? [REVISITED] Tim Bray
- Re: [Json] What is a JSON-text? [REVISITED] Peter Patel-Schneider
- Re: [Json] What is a JSON-text? [REVISITED] Stefan Drees
- [Json] What is a JSON-text? [REVISITED] Matt Miller (mamille2)
- Re: [Json] What is a JSON-text? [REVISITED] Nico Williams
- Re: [Json] What is a JSON-text? [REVISITED] Nico Williams
- Re: [Json] What is a JSON-text? [REVISITED] Nico Williams
- Re: [Json] What is a JSON-text? [REVISITED] Markus Lanthaler
- Re: [Json] What is a JSON-text? [REVISITED] Jacob Davies
- Re: [Json] What is a JSON-text? [REVISITED] Paul Hoffman
- Re: [Json] What is a JSON-text? [REVISITED] Stefan Drees
- Re: [Json] What is a JSON-text? [REVISITED] R S
- Re: [Json] What is a JSON-text? [REVISITED] Larry Masinter
- Re: [Json] What is a JSON-text? [REVISITED] Mark Nottingham
- Re: [Json] What is a JSON-text? [REVISITED] Manger, James H
- Re: [Json] What is a JSON-text? [REVISITED] Bjoern Hoehrmann
- Re: [Json] What is a JSON-text? [REVISITED] Paul Hoffman
- Re: [Json] What is a JSON-text? [REVISITED] Nico Williams
- Re: [Json] What is a JSON-text? [REVISITED] R S
- Re: [Json] What is a JSON-text? [REVISITED] Tim Bray
- Re: [Json] What is a JSON-text? [REVISITED] Paul Hoffman