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

Nico Williams <> Tue, 11 March 2014 20:52 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 0365A1A07FA for <>; Tue, 11 Mar 2014 13:52:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.044
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 ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id eyav-4p4cOUu for <>; Tue, 11 Mar 2014 13:52:25 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 664D71A07DB for <>; Tue, 11 Mar 2014 13:52:25 -0700 (PDT)
Received: from (localhost []) by (Postfix) with ESMTP id 83A1B584057 for <>; Tue, 11 Mar 2014 13:52:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed;; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:content-type;; bh=OfvS/cQYij7w231Fb/fsqF3 6pTg=; b=AmT+R4RppqGHe6NEjwi8o0rodcssc2v7/elczvZ+3ZNNTRu9MIpx2mE TO9Ct7GlDAj4FA5MdEeeTjAy8OGv357ts+OvtgIRHoX32VbFw0+mO7TybZvdE+no wlpRSsJz7kjfc0pAYU2c/g+YjXkYntDKoYE0Ie3bHKs63TpR6jOo=
Received: from ( []) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: by (Postfix) with ESMTPSA id 365F7584055 for <>; Tue, 11 Mar 2014 13:52:18 -0700 (PDT)
Received: by with SMTP id k14so8298428wgh.22 for <>; Tue, 11 Mar 2014 13:52:17 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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 with SMTP id hq4mr38851427wjb.12.1394571137074; Tue, 11 Mar 2014 13:52:17 -0700 (PDT)
Received: by with HTTP; Tue, 11 Mar 2014 13:52:17 -0700 (PDT)
In-Reply-To: <>
References: <>
Date: Tue, 11 Mar 2014 15:52:17 -0500
Message-ID: <>
From: Nico Williams <>
To: "" <>
Content-Type: text/plain; charset=UTF-8
Subject: Re: [Json] Proposal: JSON text sequence MIME type and Proposed Standard
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 11 Mar 2014 20:52:26 -0000

On Tue, Mar 11, 2014 at 1:20 PM, Nico Williams <> 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