Re: [Json] Proposal: JSON text sequence MIME type and Proposed Standard

Nico Williams <nico@cryptonector.com> Tue, 11 March 2014 20:52 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 0365A1A07FA for <json@ietfa.amsl.com>; Tue, 11 Mar 2014 13:52:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.044
X-Spam-Level:
X-Spam-Status: No, score=-1.044 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, IP_NOT_FRIENDLY=0.334] 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 eyav-4p4cOUu for <json@ietfa.amsl.com>; Tue, 11 Mar 2014 13:52:25 -0700 (PDT)
Received: from homiemail-a32.g.dreamhost.com (agjbgdcfdbgc.dreamhost.com [69.163.253.162]) by ietfa.amsl.com (Postfix) with ESMTP id 664D71A07DB for <json@ietf.org>; Tue, 11 Mar 2014 13:52:25 -0700 (PDT)
Received: from homiemail-a32.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a32.g.dreamhost.com (Postfix) with ESMTP id 83A1B584057 for <json@ietf.org>; Tue, 11 Mar 2014 13:52:19 -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:content-type; s=cryptonector.com; bh=OfvS/cQYij7w231Fb/fsqF3 6pTg=; b=AmT+R4RppqGHe6NEjwi8o0rodcssc2v7/elczvZ+3ZNNTRu9MIpx2mE TO9Ct7GlDAj4FA5MdEeeTjAy8OGv357ts+OvtgIRHoX32VbFw0+mO7TybZvdE+no wlpRSsJz7kjfc0pAYU2c/g+YjXkYntDKoYE0Ie3bHKs63TpR6jOo=
Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a32.g.dreamhost.com (Postfix) with ESMTPSA id 365F7584055 for <json@ietf.org>; Tue, 11 Mar 2014 13:52:18 -0700 (PDT)
Received: by mail-wg0-f51.google.com with SMTP id k14so8298428wgh.22 for <json@ietf.org>; Tue, 11 Mar 2014 13:52:17 -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 :content-type; bh=advCMMj08BZR4jfeC20V3TXTnW7AKHqY+N0EPVwSlJc=; b=Rdp0bjdNMek/jPbMyLixscdgLGHevDK+fMRmEOEdG+wvG2SUjZOoY++XGcK5lYTtXT 6tkTOEikFgS7HkaiHHsgL1Vl3awo+edR9f9Dur9TAJi4CEL6Mr7/gtlOmhmB64W2T5Ei 6kM+hEAovzGpy4b2+ngeBvbMPCcfq9OuGabbUG+VFCwcM9ECRZO3WN18Z1q37glQlrHt 2F38LJ00MZVAFiIvdr15ZBnkNoZmsOrc67tZuiVyPGGwX31x15i0BbVmcHh6jqNdPLem F1jM+LLGVANiF63sihLki533usFJcAcAKV9m3rUERXUqSQffmlYnH92buAz7QqgNlLRt gQYA==
MIME-Version: 1.0
X-Received: by 10.194.109.68 with SMTP id hq4mr38851427wjb.12.1394571137074; Tue, 11 Mar 2014 13:52:17 -0700 (PDT)
Received: by 10.216.199.6 with HTTP; Tue, 11 Mar 2014 13:52:17 -0700 (PDT)
In-Reply-To: <CAK3OfOiNSdC1rAO57yWH5YXpQE6bu2x7T02ejgn0fA7UK99Vow@mail.gmail.com>
References: <CAK3OfOiNSdC1rAO57yWH5YXpQE6bu2x7T02ejgn0fA7UK99Vow@mail.gmail.com>
Date: Tue, 11 Mar 2014 15:52:17 -0500
Message-ID: <CAK3OfOigsNnQvzGav=Ep8Si7P60+TJbX13-50VwZXH-UJ5WENA@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: "json@ietf.org" <json@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: http://mailarchive.ietf.org/arch/msg/json/sYOQLoOivUAjeVFuDD5BfJ8DI3k
Subject: Re: [Json] Proposal: JSON text sequence MIME type and Proposed Standard
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 20:52:26 -0000

On Tue, Mar 11, 2014 at 1:20 PM, Nico Williams <nico@cryptonector.com> wrote:
> Details:
>
>  - the newline is REQUIRED when following any of "true", "false",
> "null", or any numeric value, otherwise it is RECOMMENDED (but
> optional)

Just to clarify: it should be possible to build a JSON text sequence
parser given the above and any existing JSON parser, even when the
JSON texts do have embedded newlines (e.g., between array elements,
...).

The rationale for using a newline is twofold:

 - it's roughly how text-based log files tend to work;
 - there's always a "readline" primitive about that can be used to
build a JSON text sequence parser (in conjunction with a JSON parser,
of course).

And, of course, these are _texts_, so newlines help readability.

And this:

>  - it will be RECOMMENDED that JSON texts written to JSON text
> sequences be encoded with no newlines in the encoding.

would only help implementors who lack an incremental JSON parser, but
it would only help them if this were a requirement, which it shouldn't
be, thus there's no point to this recommendation, so I'll just remove
it.

Nico
--