Re: [Json] Regarding JSON text sequence ambiguities (Re: serializing sequences of JSON values)

Nico Williams <nico@cryptonector.com> Tue, 11 March 2014 18:08 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3AEF81A0744 for <json@ietfa.amsl.com>; Tue, 11 Mar 2014 11:08:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 3.1
X-Spam-Level: ***
X-Spam-Status: No, score=3.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FH_RELAY_NODNS=1.451, FM_FORGED_GMAIL=0.622, HELO_MISMATCH_COM=0.553, IP_NOT_FRIENDLY=0.334, RCVD_IN_BL_SPAMCOP_NET=1.347, RDNS_NONE=0.793] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ckmvUagAmrIx for <json@ietfa.amsl.com>; Tue, 11 Mar 2014 11:08:19 -0700 (PDT)
Received: from homiemail-a110.g.dreamhost.com (unknown [69.163.253.149]) by ietfa.amsl.com (Postfix) with ESMTP id 5D72F1A0473 for <json@ietf.org>; Tue, 11 Mar 2014 11:08:19 -0700 (PDT)
Received: from homiemail-a110.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a110.g.dreamhost.com (Postfix) with ESMTP id A33D52005D90A for <json@ietf.org>; Tue, 11 Mar 2014 11:08:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type:content-transfer-encoding; s= cryptonector.com; bh=FgEYCwsrluphBrwGrzNVHNrL4aI=; b=V6IblPoKE+X Nw2yIgvp/P98fMdtYCT0gWPMtxiyrxox4yvhM/LogF/HlH77kkTZZQqKcwasM65g dE3FF03G1Kus4hmPNGl3secjzJy6QOHpdQSTI5ipseBOmdFW+cgIr24edRZ6fIAZ pDN48sHID4hL0RtNRtGqjuLMDRJe9XCc=
Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a110.g.dreamhost.com (Postfix) with ESMTPSA id 4E9B32005D909 for <json@ietf.org>; Tue, 11 Mar 2014 11:08:13 -0700 (PDT)
Received: by mail-wi0-f180.google.com with SMTP id hm4so1296280wib.13 for <json@ietf.org>; Tue, 11 Mar 2014 11:08:12 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=6NqCHOH+ptOoypGvhp7sGrx/FqCWW9n5J3A9xvHqCkU=; b=eLSh4Sh9TrDO1eDpZWnL5lOOHvilrYh/b7/E0k5SEp9wYCOEvBcta44u+ei07vO2B+ +x5eeWKG/yoId3C05kCaXVYmr4wpeZfmLCSP32UhYdF7aiX0+JxWBkTj0QhmBKsk8JE9 JPNCYYUd/1QzE0IxDSt11Q+SOvkYcWdJ2CiPPKA6wbh9mftMCt+iPWM/Bzye950ehDu9 pZwUk8C9GNWCIOB/35z3GvHpTJ6MeSTzlCP+3nbTkaSS/5ORbt1ayk3LQ4o2OIcW18q8 ODYP15Gw9tPDBhNALjA96QdmFGPD1IEBv+EjerCnCOxnNG6WSksJHWSHmfeknxsY0XMQ zI/A==
MIME-Version: 1.0
X-Received: by 10.180.102.42 with SMTP id fl10mr4268864wib.42.1394561291995; Tue, 11 Mar 2014 11:08:11 -0700 (PDT)
Received: by 10.216.199.6 with HTTP; Tue, 11 Mar 2014 11:08:11 -0700 (PDT)
In-Reply-To: <CAMm+LwjRA8x0=zXGRVDy0BqYvyOcEp7=gnUiG4vYOb1RScoyrA@mail.gmail.com>
References: <CAK3OfOj_XQJq-JKAjNdH-GuH0_UwZfeWntgyyizMpTLmSaWQoA@mail.gmail.com> <CAK3OfOio58+1yuxQOcvWep1CADMfE1PVC48XDid0dWvd8=SVjA@mail.gmail.com> <CAOXDeqoYb=NXz4ikMxAg3EHFA+903bFgdpR_BL-K18U2oYriXQ@mail.gmail.com> <CAK3OfOiPDfWpOZgExTmwwq6WFcuVbyi_z3C0=M9RhQveBhV_+w@mail.gmail.com> <CAHBU6iuRyRd95Wa_omGS1_T52t+s0AKjWPUW21EAh2ySHuFp=A@mail.gmail.com> <CAMm+LwjRA8x0=zXGRVDy0BqYvyOcEp7=gnUiG4vYOb1RScoyrA@mail.gmail.com>
Date: Tue, 11 Mar 2014 13:08:11 -0500
Message-ID: <CAK3OfOj1g_sbnhw9FBCCZtLWsFS5F+aoPX0d5AMkRxQ2fHQi0A@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: Phillip Hallam-Baker <hallam@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/json/Vdnm9M0JBJsjzenLikuP_2f-yu4
Cc: Paul Hoffman <paul.hoffman@vpnc.org>, Tim Bray <tbray@textuality.com>, Matthew Morley <matt@mpcm.com>, "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Regarding JSON text sequence ambiguities (Re: serializing sequences of JSON values)
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.15
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 Mar 2014 18:08:20 -0000

On Tue, Mar 11, 2014 at 12:09 PM, Phillip Hallam-Baker <hallam@gmail.com> wrote:
> On Tue, Mar 11, 2014 at 12:48 PM, Tim Bray <tbray@textuality.com> wrote:
>>
>> Heh, I wonder if there’d be any chance of getting consensus.  I can’t
>> imagine ever using anything but Object Object Object with optional
>> whitespace separator; unless we all agree on that going in I’d pessimistic
>> about anyone convincing anyone else...
>
> But JSON has comma separators, so {..}, {..}, {..} makes far more sense.

JSON text sequences would be a new Proposed Standard (if we go there)
but like JSON, there exist uses of this "new" thing already -- that
is, before we get to writing the RFC.

The uses of JSON text sequences that I know of use newlines, not
commas nor comma-and-newline.  The reason for this is that these use
cases are text logfile-like: the entries are lines, lines containing
JSON texts -- usually compact texts, i.e., with no newlines in the
text, and never more than one text per-line.

For me other uses of JSON text sequences generally result from my use
of jq, which also effectively separates texts with a newline.  Note
that jq doesn't need texts to be written compactly when parsing JSON
text sequences.  It happens though that if you write texts compactly
followed by a newline then you can implement JSON text sequences with
all existing JSON parsers.

Switching to using a comma-and-newline would require significant
retooling.  Therefore I don't see it happening.  Whereas just
separating JSON texts with newlines is in use because it's always been
the obvious thing to do.

Nico
--