Re: [Json] draft-williams-json-text-sequence-00

Nico Williams <> Sun, 16 March 2014 07:49 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 0EC931A0054 for <>; Sun, 16 Mar 2014 00:49:56 -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 chOUfvnhP3a6 for <>; Sun, 16 Mar 2014 00:49:54 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id B45101A004A for <>; Sun, 16 Mar 2014 00:49:54 -0700 (PDT)
Received: from (localhost []) by (Postfix) with ESMTP id 7053B2005D103 for <>; Sun, 16 Mar 2014 00:49:47 -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;; bh=hqHIjuvmY4dne2oGv8ib 39qVG2E=; b=BkXZEWyA83QQt8gzqHDzQ0TnIAcfcGI46+ib9LuZKri6STBruSBx 0VI+UCMm6/yzAcxUrnUVZosJImvo8RWTv0VY8BBgB3ZGDE6zklmnXAasLrGYgQBG kDwaedUIs7OkHSxWo3xdLFMBPYaZN12MCxuCDS4yY+XTkCqAo2j5El8=
Received: from ( []) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: by (Postfix) with ESMTPSA id 25A8C2005D102 for <>; Sun, 16 Mar 2014 00:49:46 -0700 (PDT)
Received: by with SMTP id d1so1009900wiv.13 for <>; Sun, 16 Mar 2014 00:49:45 -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 :cc:content-type; bh=RLwzB5rL/NVyz/Gct8qmsl4M3yqVSWspr2JWzFxsjBc=; b=WLNL/XTIm8TFlrLAXGszseZg1wIPPoTiQ2zdIEotXbAvpWZ+0LzR9CsYogv37I4Dt4 m7/68dlt6pUssvdP/13FotyDeIFb3Sazn8CcsVR1LNUY6IPbcSx+Jak00Idrt3m0Rgz4 05pp+jeQVJsJ/PVns76y2L8aX9Z34giU5WnICZOg5F504HpHiqc02ooETLbPltrZjv9d AFc+ePh84T8o9Z2MWg+fMJkZ6PWOnI5n1cHffc2lvYvrC3rEAmGXolQoN8B9A2O1egNG gFtqQYDRJ2m/6Upc61Dcs9xMO+8zN64TSA1cmCnMoFAiRlAHfYiTRC4Ad1azogeIO2b5 vovg==
MIME-Version: 1.0
X-Received: by with SMTP id k4mr540170wjn.49.1394955841504; Sun, 16 Mar 2014 00:44:01 -0700 (PDT)
Received: by with HTTP; Sun, 16 Mar 2014 00:44:01 -0700 (PDT)
In-Reply-To: <>
References: <> <>
Date: Sun, 16 Mar 2014 02:44:01 -0500
Message-ID: <>
From: Nico Williams <>
To: John Cowan <>
Content-Type: text/plain; charset="UTF-8"
Cc: "" <>
Subject: Re: [Json] draft-williams-json-text-sequence-00
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: Sun, 16 Mar 2014 07:49:56 -0000

On Sat, Mar 15, 2014 at 2:41 PM, John Cowan <> wrote:
> 1) Your terminology of "online parsers" and "incremental parsers"
> is very confusing.  What you call an "online parser", I would call a
> "streaming parser", because it returns portions of arrays, objects, and
> possibly even strings as a stream of events.  Your "incremental parser"
> is simply a parser that stops reading when it reaches the end of a JSON
> text without insisting that there be no additional characters.

Oops, in an earlier version (not submitted) I defined these terms, but
after someone made a convincing argument to not require that texts not
have embedded newlines... I removed it.  I didn't remove the remaining
references to online/incremental parsers.

> 2) The sentence "Encoders MUST emit" should refer explicitly to
> the grammar.  Currently the grammar is completely unmoored from the
> requirements.  "Encoders MUST emit JSON text sequences that conform to
> the ABNF" is sufficient.

True.  Also a remnant of an earlier version.  I'll fix this too.

> 3) The sentence "Two contiguous separators do not" is unnecessary,
> because there are no empty JSON texts.

I know this.  I just figure someone will wonder if I don't say it.

> 4) In "Parsers MUST be able", for "to parser" read "to parse".  But as
> in #2, this should simply say "Parsers MUST be able to parse any text
> conforming to the ABNF" for the same reasons.


> 5) The recommendation seems entirely unnecessary to me.

Well, it's superfluous if encoders must adhere to the ABNF, that's true.

> 6) I still don't see that there is any ambiguity in "truefalse" considered
> as two JSON-texts.  So I would strip "Parsers MAY parse" to just say
> "sequences where the separators are missing."  Note that such sequences
> don't conform anyway.

It's true that 'trusfalse' does not conform to the ABNF, therefore
it's not a legal sequence.  Removing the options (and recommendation)
would suffice.

> 7) If you want newline-free JSON-texts to be in serious use, the second
> MAY should be promoted to a SHOULD.

I no longer do.  I wasn't ever sure that was a good idea either.