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

Nico Williams <nico@cryptonector.com> Fri, 23 May 2014 16:01 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 B96C11A06B3 for <json@ietfa.amsl.com>; Fri, 23 May 2014 09:01:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.444
X-Spam-Level:
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 mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3TQBUkxX4Fje for <json@ietfa.amsl.com>; Fri, 23 May 2014 09:01:37 -0700 (PDT)
Received: from homiemail-a102.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 5891A1A067E for <json@ietf.org>; Fri, 23 May 2014 09:01:37 -0700 (PDT)
Received: from homiemail-a102.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a102.g.dreamhost.com (Postfix) with ESMTP id D50E42006D30D for <json@ietf.org>; Fri, 23 May 2014 09:01:35 -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=nUOfZVqaxjIA725pN/D8192GXCE=; b=JLCU3xV8txN vzWFuiC5+tVDwhD83708Tak8aBTM9wn1JLijkBT43VjcUe6YRAXaZr5L0tSy7WYb OiktGwzHQq1XwwDqCHv0j/DiboXcPD/Nfeys/h68tHS36bAWRGETnODutLSHL+bk IG9SlAYkKfKDxV8XbwKG75MRp/s3wSYs=
Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a102.g.dreamhost.com (Postfix) with ESMTPSA id 8875A2006D30C for <json@ietf.org>; Fri, 23 May 2014 09:01:35 -0700 (PDT)
Received: by mail-wi0-f169.google.com with SMTP id hi2so1320520wib.4 for <json@ietf.org>; Fri, 23 May 2014 09:01:34 -0700 (PDT)
MIME-Version: 1.0
X-Received: by 10.180.77.225 with SMTP id v1mr4112685wiw.5.1400860894296; Fri, 23 May 2014 09:01:34 -0700 (PDT)
Received: by 10.216.29.200 with HTTP; Fri, 23 May 2014 09:01:34 -0700 (PDT)
In-Reply-To: <20140523013240.GF15289@mercury.ccil.org>
References: <F6B74FE0-AEBE-43CC-BDE6-BA443BC04F2D@vpnc.org> <CAHBU6itW=UQq=w_wFwYJkZLT2GotUg_J1LGs-Fhcqg_vBd4+6A@mail.gmail.com> <20140523013240.GF15289@mercury.ccil.org>
Date: Fri, 23 May 2014 11:01:34 -0500
Message-ID: <CAK3OfOg088r=4VMv6PJxb97oJ6ctoUvwgkmGzi58ZkpisjoaoA@mail.gmail.com>
From: Nico Williams <nico@cryptonector.com>
To: John Cowan <cowan@mercury.ccil.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Archived-At: http://mailarchive.ietf.org/arch/msg/json/6EyW34KECrIBnwL3eloMt590S4M
Cc: Tim Bray <tbray@textuality.com>, Paul Hoffman <paul.hoffman@vpnc.org>, IETF JSON WG <json@ietf.org>
Subject: Re: [Json] Working Group Last Call on draft-ietf-json-text-sequence
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: Fri, 23 May 2014 16:01:40 -0000

On Thu, May 22, 2014 at 8:32 PM, John Cowan <cowan@mercury.ccil.org> 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
text)

 - 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
distinctions.

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 (https://stedolan.github.io/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.

Nico
--