Re: [Json] Allow any JSON value at the top level

Tatu Saloranta <tsaloranta@gmail.com> Tue, 11 June 2013 18:34 UTC

Return-Path: <tsaloranta@gmail.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 53EE721F991F for <json@ietfa.amsl.com>; Tue, 11 Jun 2013 11:34:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.466
X-Spam-Level:
X-Spam-Status: No, score=-2.466 tagged_above=-999 required=5 tests=[AWL=0.133, BAYES_00=-2.599, HTML_MESSAGE=0.001, NO_RELAYS=-0.001]
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 SgJJnEGL-nnN for <json@ietfa.amsl.com>; Tue, 11 Jun 2013 11:34:37 -0700 (PDT)
Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::22f]) by ietfa.amsl.com (Postfix) with ESMTP id 2DC1B21F96E9 for <json@ietf.org>; Tue, 11 Jun 2013 11:34:36 -0700 (PDT)
Received: by mail-wg0-f47.google.com with SMTP id l18so2746849wgh.14 for <json@ietf.org>; Tue, 11 Jun 2013 11:34:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VkrNOEXtixp7EiBkNKbYnsBgbRQrnBHCRJXXvKL2p00=; b=bgjX+xfKozeBoC+WmmBrrW4cQOI5upbbza+1j2I0UO2DWmA3qotONzHJDW7dc7QOut 38cpI1w0Ju9pnPWb8tRFLHMntd/dq93sv/mfO+1QpOx+TrD8akz5Gn4x7k89kr4tJPt/ O89eX3d7lwGhF6bg4B10w/tRxaC+V0mchED1E7Lz/XP/yqLP5IF9aq39QwAg4TVvd4BQ 0gTGqDbubTdqGghLCvPgW556Bn/SuQdYkKgduQZXEyfHFb/ZOV26GYmjlMBDirqcfBsc bKJ3yLiWzYOsshf9konin4z49VvihVosYQJvo724o4ZeIY1YsJ5sfrd9KpIsjxynz2Mr 5iDg==
MIME-Version: 1.0
X-Received: by 10.180.11.194 with SMTP id s2mr2218212wib.7.1370975676220; Tue, 11 Jun 2013 11:34:36 -0700 (PDT)
Received: by 10.227.72.74 with HTTP; Tue, 11 Jun 2013 11:34:36 -0700 (PDT)
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E1151B430DAD@WSMSG3153V.srv.dir.telstra.com>
References: <A723FC6ECC552A4D8C8249D9E07425A70FC33B5B@xmb-rcd-x10.cisco.com> <51b23e6d.6196420a.0b15.4245SMTPIN_ADDED_BROKEN@mx.google.com> <CAChr6SwrveU=fesF8VidDYWzeYMu2c1+=38+__BqHArxTiW5mg@mail.gmail.com> <51b4dbbe.64da440a.1fc2.6dd2SMTPIN_ADDED_BROKEN@mx.google.com> <CAChr6Sx_obmG+=sY100ySBLmevN0VJ_0Z9TjYGxcXKOx+UtnJA@mail.gmail.com> <51b4ec44.ea05420a.7c73.ffffa487SMTPIN_ADDED_BROKEN@mx.google.com> <CAChr6SxiZ2Yz6SiozQZpuYoGKSzWnUux6PukyWDkcvKsVyyRbQ@mail.gmail.com> <51b507b1.c686e00a.3a7e.ffffa0adSMTPIN_ADDED_BROKEN@mx.google.com> <CAO1wJ5R2H27qh-DWG5B8CzutkTFWxn-h+Qi1jiet23axxmvLyA@mail.gmail.com> <20130610201746.GC1057@mercury.ccil.org> <CAO1wJ5Q9mhspheU3h4NRx9x5LOz9yOgJBXhwPWBOVw-w71ncTQ@mail.gmail.com> <3CE20E15-8F9E-4727-BBE7-FBB06F7CAC24@jorgechamorro.com> <CAGrxA24T8m9oHmuVE8n+YG6ATr3sTTByet7Te8VyAmypD11p6w@mail.gmail.com> <B14769F1-5C71-4F1D-8E20-513271876620@vpnc.org> <CAChr6SzXUNTA+bMtFAwWh+Z2APoiSuAt7DQzx+RK57+vznN1-w@mail.gmail.com> <CAHBU6isx8PCMGk9XAP-WZszn79c2hDPk78=7r9L4T2oTzPU7MA@mail.gmail.com> <CAChr6Swi5UjTnggXF88qrVQ8Wg-kGfKfEQN-3+2BwoEZw5TvVA@mail.gmail.com> <255B9BB34FB7D647A506DC292726F6E1151B430DAD@WSMSG3153V.srv.dir.telstra.com>
Date: Tue, 11 Jun 2013 11:34:36 -0700
Message-ID: <CAGrxA24fv4Rbr=XKgW3P7EUJd=Wt_rx+OFvM_2dYmwMVhgY5JQ@mail.gmail.com>
From: Tatu Saloranta <tsaloranta@gmail.com>
To: "Manger, James H" <James.H.Manger@team.telstra.com>
Content-Type: multipart/alternative; boundary="001a11c355a22d4e3104dee5267b"
Cc: "json@ietf.org" <json@ietf.org>, R S <sayrer@gmail.com>
Subject: Re: [Json] Allow any JSON value at the top level
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: Tue, 11 Jun 2013 18:34:38 -0000

+1 for this: although I can see why additional media type is suggested, I
just do not see it as a better alternative from practical viewpoint, due to
these reasons.

-+ Tatu +-


On Mon, Jun 10, 2013 at 9:19 PM, Manger, James H <
James.H.Manger@team.telstra.com> wrote:

> > A new media type would solve any problem that I'm aware of.
>
> A new media type for any JSON value (not just object or array) could work
> in theory, but I doubt it can work in practice.
>
> It would significantly complicate conversations about JSON. Mentions of
> JSON in APIs, protocols, specs etc would have to qualify whether or not
> they support both, or just one, of the media types. Two media types
> probably need to be advertised in HTTP Accept headers. There would be two
> choices for media type when sending a JSON object or array, which would
> produce different behaviour in some cases (eg "old" systems that don't know
> about the new type).
>
> Would media types with a +json suffix allow any JSON values? Or would we
> need a second suffix as well?
>
> It would be better to allow any JSON value with the existing media type
> and suffix.
>
>
> A top-level JSON value would no longer necessarily be self-delimiting. I
> doubt this is that crucial. Many media types are not self-delimiting. Even
> JSON objects and arrays are not strictly self-delimiting as they allow
> leading and trailing whitespace. Appending whitespace to a JSON value would
> make as self-delimiting again – restoring this property where needed
> (allowing whitespace around non-object-non-array top-level values would be
> a sensible part of the change).
>
> --
> James Manger
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json
>