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

Tatu Saloranta <tsaloranta@gmail.com> Fri, 07 June 2013 17:54 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 2703621F9968 for <json@ietfa.amsl.com>; Fri, 7 Jun 2013 10:54:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.332
X-Spam-Level:
X-Spam-Status: No, score=-2.332 tagged_above=-999 required=5 tests=[AWL=0.267, 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 7oHKADI6cFbR for <json@ietfa.amsl.com>; Fri, 7 Jun 2013 10:54:55 -0700 (PDT)
Received: from mail-we0-x22a.google.com (mail-we0-x22a.google.com [IPv6:2a00:1450:400c:c03::22a]) by ietfa.amsl.com (Postfix) with ESMTP id EA81321F9954 for <json@ietf.org>; Fri, 7 Jun 2013 10:54:54 -0700 (PDT)
Received: by mail-we0-f170.google.com with SMTP id w57so3370738wes.29 for <json@ietf.org>; Fri, 07 Jun 2013 10:54:52 -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=D92M9jyR9EXavPx/DP0sdJTWQQq1NAy0CxGZ6WmkI0M=; b=oebWJ/+RyP7fuNWfDXSovmtDbznFaZRTbU7mW6JDMM6cv6rQ0Uu199FECB9AMxwcd8 vimVxSHp45CtQUr9nWR77fn5hsVqFJJhucmhfF1fWFILyjxyUWcVy4+eUla+iRqMB6y5 KWyyhSnaDJUL6GMTIKHQmH5QKwGn3ly7kk2GO6ntEdzsCwLAcu8u4xYIv9jBmPx7nP8b iIlvzmCgh8EZ4bjB3OhJJIQsiisnoZP250d0tWBV9hhUaMnffriwuo4f+Hm0joNkSXiu zjDIXybfJiaHTW1kSYSeVoZ/S6gtAtDOC2+ex/o8/eN/WP+PR9/IMEyfca8ZOU85mQQ/ PHnQ==
MIME-Version: 1.0
X-Received: by 10.180.185.44 with SMTP id ez12mr2492645wic.7.1370627692647; Fri, 07 Jun 2013 10:54:52 -0700 (PDT)
Received: by 10.227.97.6 with HTTP; Fri, 7 Jun 2013 10:54:52 -0700 (PDT)
In-Reply-To: <A2D3D8F3-1EB3-4CD6-A331-4EDCDB7F9798@tzi.org>
References: <255B9BB34FB7D647A506DC292726F6E1151B21F9A9@WSMSG3153V.srv.dir.telstra.com> <A2D3D8F3-1EB3-4CD6-A331-4EDCDB7F9798@tzi.org>
Date: Fri, 07 Jun 2013 10:54:52 -0700
Message-ID: <CAGrxA27z-tqgKWcyKNc7ojoUi3Z==hReETrddfYMVxTfVEAhhQ@mail.gmail.com>
From: Tatu Saloranta <tsaloranta@gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Content-Type: multipart/alternative; boundary="001a11c22574bd5cf504de942024"
Cc: "Manger, James H" <James.H.Manger@team.telstra.com>, "json@ietf.org" <json@ietf.org>
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: Fri, 07 Jun 2013 17:54:56 -0000

On Fri, Jun 7, 2013 at 1:59 AM, Carsten Bormann <cabo@tzi.org> wrote:

> On Jun 7, 2013, at 05:51, "Manger, James H" <
> James.H.Manger@team.telstra.com> wrote:
>
> > I propose allowing a JSON text to be any JSON value.
> >
> >   A JSON text is a serialization of any JSON value.
> >
> >   JSON-text = value
>
> Apart from the (intellectually nicely challenging, but practically
> irrelevant) auto-detection thing,


Irrelevant based on what? I thought this is what any half-decent JSON
parser did; unless platform does not expose byte sequence as input, case
for some scripting languages.
I have written multiple parsers (json, xml) that do just this, and know
that others exist as well.

I don't know what leads to assumption of irrelevancy here, and it should be
fully spelled out.

one other result is that JSON texts no longer stream.  RFC 4627 texts are
> self-delimiting, the new ones wouldn't always be.  Of course, if you want
> to stream sequences of JSON texts, you could always limit those back to
> arrays or maps ("objects").
>


I don't see this as any less self-delimiting, although best-practices would
probably dictate suggestion to add white space between root-level values.

Which is what existing tools that allow this do, as expected.

-+ Tatu +-