Re: [Json] Inconsistency between RFC 8259 and RFC 5234
Mark Nottingham <mnot@mnot.net> Wed, 13 December 2017 00:04 UTC
Return-Path: <mnot@mnot.net>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BC686126DCA for <json@ietfa.amsl.com>; Tue, 12 Dec 2017 16:04:08 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 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_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mnot.net header.b=iku06Wwp; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=RMKN17WM
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 LVgBtHfeutJG for <json@ietfa.amsl.com>; Tue, 12 Dec 2017 16:04:05 -0800 (PST)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0FE99126CBF for <json@ietf.org>; Tue, 12 Dec 2017 16:04:05 -0800 (PST)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 4B86720BCF; Tue, 12 Dec 2017 19:04:04 -0500 (EST)
Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Tue, 12 Dec 2017 19:04:04 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=RgdZHCHiXuXRVSX4wR+bo6hl8EefR FSDicWIW9qVrXk=; b=iku06Wwp14fiPuJaCgYsjEobHgsU9YIFtdJNhal31BBf3 1ubYlnW8IGnV5EeBGUi0HzXoNU0/hjM6+wf+O3mq8v2gXSmx0OQRAQXTzZJWK6hU mLXrJA9EICmE+wFZjRwTB2h4Uwk2qCRFziYZwBXaJja5WM39vM5lF50S+mu/jkga QK+HxTzwxXH/HM2XlvlKoTP+Omws4QnA8kv567vDO/rBWKHP2lxP0Pq7zhYSTMrA e4IHu9+TeJ2je+srdTQGYdLVrLItrWE7UTO3SyvflorYFbwhB1AlO0NIK8n+DF7b MbB04Y3N7qzR+QhoMoIj5TinxJZ9tnsstGSnQGb5w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=RgdZHC HiXuXRVSX4wR+bo6hl8EefRFSDicWIW9qVrXk=; b=RMKN17WMA5jzDyk8218c3f HIB5HR8ObB2y7GH0bDoHlleGOsjcZ6tKLYZeOpEGHDGRTA83BD0bLm/Ahm6j3uX6 fkE6Jrr3JiTiwl1hPnysp9YWZ9aEP1C4nfDy6A3LKN2RzdjGEhXRKp5Ghis2FyGs 9PTyFQ/qlIwgydx7Be7ScIlrDLF3cuqJB5iYPkJ+tZx5hvX1R/UF7Em8KsjHMqnW TzUffaes+n0lBHovtXlPCSEJpfqjiy+qlkNs7g49e57EpzrvbwHaSsVrB2PTkFnC 8DEFCAdAJBuU40HXdx01O6uC44GjkExlgxjRpbEBai7WukAgl+mp9vmyoi65JbVg ==
X-ME-Sender: <xms:dG4wWnPloiKK4MJItjHEjLY1wt2fitbKIryBhtLkambv_mKu5nPTBQ>
Received: from [192.168.1.18] (cpe-144-136-175-28.sa.bigpond.net.au [144.136.175.28]) by mail.messagingengine.com (Postfix) with ESMTPA id 4CA46240A4; Tue, 12 Dec 2017 19:04:03 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <CAHBU6ivZ9zLN3Np+AYszu5TK4kv88uOHq7VvMEiyERGFhh=cnQ@mail.gmail.com>
Date: Wed, 13 Dec 2017 11:03:58 +1100
Cc: json@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <87DE6791-D273-4EE7-8F4E-F9ADE4F57FFB@mnot.net>
References: <CAPeSZfAYyU34Qfwzn7ESgGCb052uZn0SZqeDyfvpw-5du2sqKA@mail.gmail.com> <CAHBU6ivZ9zLN3Np+AYszu5TK4kv88uOHq7VvMEiyERGFhh=cnQ@mail.gmail.com>
To: Tim Bray <tbray@textuality.com>
X-Mailer: Apple Mail (2.3445.4.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/fuhJf0xS_5nH1x7pvE2uYVDgB90>
Subject: Re: [Json] Inconsistency between RFC 8259 and RFC 5234
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.22
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: <https://mailarchive.ietf.org/arch/browse/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: Wed, 13 Dec 2017 00:04:09 -0000
Nope, it's OK. 5234 section 2.3: """ Literal text strings are interpreted as a concatenated set of printable characters. NOTE: ABNF strings are case insensitive and the character set for these strings is US-ASCII. Hence: rulename = "abc" and: rulename = "aBc" will match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC", and "ABC". To specify a rule that is case sensitive, specify the characters individually. For example: rulename = %d97 %d98 %d99 or rulename = %d97.98.99 will match only the string that comprises only the lowercase characters, abc. """ > On 13 Dec 2017, at 10:55 am, Tim Bray <tbray@textuality.com> wrote: > > Ouch, I think he's right. > ---------- Forwarded message ---------- > From: "Dale Schumacher" <dale.schumacher@gmail.com> > Date: Dec 12, 2017 12:42 PM > Subject: Inconsistency between RFC 8259 and RFC 5234 > To: "Tim Bray" <tbray@textuality.com> > Cc: "Douglas Crockford" <douglas@crockford.com> > > I'm attempted to reach out to you directly, since https://www.rfc-editor.org/info/rfc8259 (the recommended feedback channel) currently returns "RFC 8259 does not exist". > > It appears that the JSON grammar makes use of two "Core" ABNF rules: > > DIGIT = %x30-39 > ; 0-9 > > HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" > > > However, JSON allows both upper and lower case in Unicode escapes within a string. In which case, the grammar for such escapes: > > char = unescaped / > escape ( > %x22 / ; " quotation mark U+0022 > %x5C / ; \ reverse solidus U+005C > %x2F / ; / solidus U+002F > %x62 / ; b backspace U+0008 > %x66 / ; f form feed U+000C > %x6E / ; n line feed U+000A > %x72 / ; r carriage return U+000D > %x74 / ; t tab U+0009 > %x75 4HEXDIG ) ; uXXXX U+XXXX > > > is incorrect. > > If I may be permitted a recommendation, I would suggest that the JSON grammar _not_ use the "Core" ABNF rules. Instead it could provide local definitions such as: > > digit0-9 = %x30-39 ; 0-9 > > hexdigit = digit0-9 / %x41-x46 / %x61-66 > > > The use of "Core" ABNF rules doesn't seem to save much, in this case, and the indirection makes it easy to overlook this inconsistency. > > Thanks for your consideration, > Dale Schumacher > > _______________________________________________ > json mailing list > json@ietf.org > https://www.ietf.org/mailman/listinfo/json -- Mark Nottingham https://www.mnot.net/