RE: Gen-ART and OPS-Dir review of draft-ietf-json-text-sequence-09

"Black, David" <david.black@emc.com> Wed, 10 December 2014 02:53 UTC

Return-Path: <david.black@emc.com>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 25DCC1A88BF; Tue, 9 Dec 2014 18:53:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.311
X-Spam-Level:
X-Spam-Status: No, score=-4.311 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 QyYz2hnkMb9V; Tue, 9 Dec 2014 18:53:01 -0800 (PST)
Received: from mailuogwhop.emc.com (mailuogwhop.emc.com [168.159.213.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C9E0D1A1AA2; Tue, 9 Dec 2014 18:53:00 -0800 (PST)
Received: from maildlpprd06.lss.emc.com (maildlpprd06.lss.emc.com [10.253.24.38]) by mailuogwprd01.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id sBA2quPA015199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Dec 2014 21:52:57 -0500
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd01.lss.emc.com sBA2quPA015199
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=emc.com; s=jan2013; t=1418179977; bh=krAw9SrMi3DtJ1IgEIGa0pJt1/E=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:Content-Transfer-Encoding:MIME-Version; b=bMFqKYCXDGkKkYOHeemX9yfuIl8jPyM22aA/lUG5ecoVgVTjZdCPq9oYwDr0qfWTQ lkoClmVGHz94PZHfYxEsM0P/y3EaOKe5RcWjOgJm3KcunQc3J/1dRTGxFb0B1rY4Ul 9d/l6yAJrWOFzHLWxn/TaR8zI86HfU74RYWtDWHM=
X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd01.lss.emc.com sBA2quPA015199
Received: from mailusrhubprd53.lss.emc.com (mailusrhubprd53.lss.emc.com [10.106.48.18]) by maildlpprd06.lss.emc.com (RSA Interceptor); Tue, 9 Dec 2014 21:52:36 -0500
Received: from mxhub38.corp.emc.com (mxhub38.corp.emc.com [128.222.70.105]) by mailusrhubprd53.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id sBA2qZnU007446 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 9 Dec 2014 21:52:36 -0500
Received: from MXHUB210.corp.emc.com (10.253.68.36) by mxhub38.corp.emc.com (128.222.70.105) with Microsoft SMTP Server (TLS) id 8.3.327.1; Tue, 9 Dec 2014 21:52:35 -0500
Received: from MX104CL02.corp.emc.com ([169.254.8.208]) by MXHUB210.corp.emc.com ([10.253.68.36]) with mapi id 14.03.0195.001; Tue, 9 Dec 2014 21:52:35 -0500
From: "Black, David" <david.black@emc.com>
To: Nico Williams <nico@cryptonector.com>
Subject: RE: Gen-ART and OPS-Dir review of draft-ietf-json-text-sequence-09
Thread-Topic: Gen-ART and OPS-Dir review of draft-ietf-json-text-sequence-09
Thread-Index: AdAQmuBgzIEwbXsVSl+UfPcrbL3cqwC9mNEAAAwOi4AADxtigAAJ/CegAAXNMQAABlY1sA==
Date: Wed, 10 Dec 2014 02:52:34 +0000
Message-ID: <CE03DB3D7B45C245BCA0D243277949362AF4C9@MX104CL02.corp.emc.com>
References: <CE03DB3D7B45C245BCA0D24327794936289DC7@MX104CL02.corp.emc.com> <20141209041937.GD11221@localhost> <CE03DB3D7B45C245BCA0D243277949362AE54B@MX104CL02.corp.emc.com> <20141209171724.GB12979@localhost> <CE03DB3D7B45C245BCA0D243277949362AE8A0@MX104CL02.corp.emc.com> <20141210004925.GQ12979@localhost>
In-Reply-To: <20141210004925.GQ12979@localhost>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.250.61.31]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Sentrion-Hostname: mailusrhubprd53.lss.emc.com
X-RSA-Classifications: public
Archived-At: http://mailarchive.ietf.org/arch/msg/ietf/hYadNi2A_sK1jLrbNVzJxGEC6Bs
Cc: "General Area Review Team (gen-art@ietf.org)" <gen-art@ietf.org>, "json@ietf.org" <json@ietf.org>, "ops-dir@ietf.org" <ops-dir@ietf.org>, "Black, David" <david.black@emc.com>, "ietf@ietf.org" <ietf@ietf.org>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf/>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 10 Dec 2014 02:53:03 -0000

This looks good, and the explanation of what's going on (numbers,
'true', 'false' and 'null' lack delimiters) is a useful addition.

One small nit:

	'<RS>truefales<RS>' is not two top-level values, 'true',
	and 'false'; it is simply not a valid JSON text.

truefales -> truefalse

Thanks,
--David
 
> On Tue, Dec 09, 2014 at 06:49:35PM +0000, Black, David wrote:
> > > So I think we really do need to say something about top-level numbers
> > > (and true, false, and null), namely: that they must be delimited by
> > > whitespace, that '<RS>1234<RS>' is not a valid sequence element because
> > > the number may have been truncated.  (Ditto '<RS>true<RS>', since the
> > > intended text could have been 'trueish', which is invalid of course, but
> > > still.)
> >
> > That would be more robust, as then all JSON texts in a sequence have
> > delimiters and absence of the closing delimiter clearly indicates
> > truncation.
> 
> OK.
> 
> New section 2.4 text:
> 
>    While objects, arrays, and strings are self-delimited in JSON texts,
>    numbers, and the values 'true', 'false', and 'null' are not.  Only
>    whitespace can delimit the latter four kinds of values.
> 
>    Parsers MUST check that any JSON texts that are a top-level number,
>    or which might be 'true', 'false', or 'null' include JSON whitespace
>    (at least one byte matching the "ws" ABNF rule from RFC7159) after
>    that value, otherwise the JSON-text may have been truncated.  Note
>    that the LF following each JSON text matches the "ws" ABNF rule.
> 
>    Parsers MUST drop JSON-text sequence elements consisting of
>    non-self-delimited top-level values that may have been truncated
>    (that are not delimited by whitespace).  Parsers can report such
>    texts as warnings (including, optionally, the parsed text and/or the
>    original octet string).
> 
>    For example, '<RS>123<RS>' might have been intended to carry the
>    top-level number 123.4, but must have been truncated.  Similarly,
>    '<RS>true<RS>' might have been intended to carry the invalid text
>    'trueish'.  '<RS>truefales<RS>' is not two top-level values, 'true',
>    and 'false'; it is simply not a valid JSON text.
> 
> This is the only place where the ws rule comes up, so merely saying "at
> least one byte matching" it should suffice.
> 
> I'm also adding this following the above, based on your comment about
> incremental parsers:
> 
>    Implementations may produce a value when parsing '<RS>"foo"<RS>'
>    because their JSON text parser might be able to consume bytes
>    incrementally, and since the JSON text in this case is a
>    self-delimiting top-level value, the parser can produce the result
>    without consuming an additional byte.  Such implementations should
>    skip to the next RS byte, possibly reporting any intervening
>    non-whitespace bytes.
> 
> (yes, I think this should be a 'should', not a 'SHOULD').
> 
> Nico
> --