Re: [Json] Working Group Last Call on draft-ietf-json-text-sequence

Nico Williams <> Fri, 23 May 2014 16:01 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id B96C11A06B3 for <>; Fri, 23 May 2014 09:01:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -0.444
X-Spam-Status: No, score=-0.444 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, J_CHICKENPOX_45=0.6, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 3TQBUkxX4Fje for <>; Fri, 23 May 2014 09:01:37 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 5891A1A067E for <>; Fri, 23 May 2014 09:01:37 -0700 (PDT)
Received: from (localhost []) by (Postfix) with ESMTP id D50E42006D30D for <>; Fri, 23 May 2014 09:01:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed;; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type:content-transfer-encoding; s=; bh=nUOfZVqaxjIA725pN/D8192GXCE=; b=JLCU3xV8txN vzWFuiC5+tVDwhD83708Tak8aBTM9wn1JLijkBT43VjcUe6YRAXaZr5L0tSy7WYb OiktGwzHQq1XwwDqCHv0j/DiboXcPD/Nfeys/h68tHS36bAWRGETnODutLSHL+bk IG9SlAYkKfKDxV8XbwKG75MRp/s3wSYs=
Received: from ( []) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: by (Postfix) with ESMTPSA id 8875A2006D30C for <>; Fri, 23 May 2014 09:01:35 -0700 (PDT)
Received: by with SMTP id hi2so1320520wib.4 for <>; Fri, 23 May 2014 09:01:34 -0700 (PDT)
MIME-Version: 1.0
X-Received: by with SMTP id v1mr4112685wiw.5.1400860894296; Fri, 23 May 2014 09:01:34 -0700 (PDT)
Received: by with HTTP; Fri, 23 May 2014 09:01:34 -0700 (PDT)
In-Reply-To: <>
References: <> <> <>
Date: Fri, 23 May 2014 11:01:34 -0500
Message-ID: <>
From: Nico Williams <>
To: John Cowan <>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: Tim Bray <>, Paul Hoffman <>, IETF JSON WG <>
Subject: Re: [Json] Working Group Last Call on draft-ietf-json-text-sequence
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: Fri, 23 May 2014 16:01:40 -0000

On Thu, May 22, 2014 at 8:32 PM, John Cowan <> wrote:
> Tim Bray scripsit:
>> The second sentence is klunky and I don’t understand what it’s trying
>> to say.  I suggest attaching the first sentence to the previous para
>> and just losing the 2nd sentence.
> The key to understanding the second sentence is that "online" means what
> you and I call "streaming".

I classify JSON parsers as follows:

 - streaming -> consume input text incrementally AND produce results
incrementally (e.g., a path+value pair for each scalar value in a

 - online -> consume input text incrementally (but -perhaps- produces
one value for a complete parsed text)

 - not-online -> consumes input text non-incrementally, must be
provided complete texts

Streaming parsers are also online parsers in my classification.

Perhaps I'm using the wrong terminology, but I've yet to see a
standard classification of JSON parsers that captures these

The value of JSON text sequences comes from not having to use a
streaming parser (since they can be unwieldy).  There is also value on
the encoding side: not having to use a streaming encoder, nor manually
emit an opening '[' and ','s between texts.

A real-world example of this is jq (,
which has an online-but-streaming parser, and which naturally supports
JSON text sequences.  jq can consume (and produce) JSON text sequences
in a "streaming" manner even though its JSON parser and encoder are
not streaming.