Re: [Json] Inconsistency between RFC 8259 and RFC 5234
Tim Bray <tbray@textuality.com> Wed, 13 December 2017 00:22 UTC
Return-Path: <tbray@textuality.com>
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 DEB8712704A for <json@ietfa.amsl.com>; Tue, 12 Dec 2017 16:22:13 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=textuality-com.20150623.gappssmtp.com
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 1Q-MHDuG0k0o for <json@ietfa.amsl.com>; Tue, 12 Dec 2017 16:22:09 -0800 (PST)
Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7E97D126CBF for <json@ietf.org>; Tue, 12 Dec 2017 16:22:09 -0800 (PST)
Received: by mail-wm0-x22d.google.com with SMTP id b76so1914413wmg.1 for <json@ietf.org>; Tue, 12 Dec 2017 16:22:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=textuality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=bOYGcefUc9LeP5y2vmq+iyZBsP/noFBqMwfcqi++cE4=; b=mrBWpAzsGuJEBkDVVbq4daeRTSmUwFAgK6aeE7nIYFYuuHkayz0Sg5JpYvYsUBXPu3 +fxMg7HJL94LM/2uplMsGAm4diCcleBHH9c0vUhjPpCiIZXpm70IVA7s5rmTxzAPtpbQ W5iyZ6A4s30/JCNwc3iH9sIgGSvokrKEevLjjPx/kBxhAbpgsdE1vdOjqk1R/pLKQRrc QYubeP9NI5+zRajk4USrJVWlamqLWOtlcT+iHdVNlBSc+pjhUjo+/x80hhFbf9Rvra+X 75aUdmvRCZhz9n5elC5K7so9e6Hnvd+QkjXX/N7k1krpZofOSDhUQQbUfWK2BT7L8aYB Owmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=bOYGcefUc9LeP5y2vmq+iyZBsP/noFBqMwfcqi++cE4=; b=WIdrQQMPc0XFYbtVfeuegZ38Y1kiIBFewzbatjn1ONI5z8fvg8rOi5tGZIc5wBxI9g 1F8ZsXrzhJmJWwfBpiNg6VxazumdId5sqfM+yXNYJMJbfZ5wIAR2YPWN5catRFgt4R0d ZB7Ai8h69r4mJUwe3ATrF0qnVY/VY3ATEnfLNL7ULeu8iS17CAYSoT9cd7O4cL62FE6c UVkhnTVVjCXnH3R6BWK6NJzA6vOvPmDBevNFjvcNSU3RcPR4kqw1o7Ql3MGTfGDRZkvb 9U38w356eeSK4py+vsWkp1JqGgfEzxrS1+MMnUyUKVRjh93WzLA/34QmaX7BXTNQqyhG ofzw==
X-Gm-Message-State: AKGB3mKZFAFx+ET2GorIe1uTQjrjVa1dagX3azZsU0F2tDz5WZ8+PDxb 4OZBLsb+JqnhpHBKUlLh7sO6b8mBLsFaTaN/mAFN9QxZ
X-Google-Smtp-Source: ACJfBosacmGIMCffIdivqXsFJcGNl1AuMIIA8bo8xjAcSmqD7j2/h786UagBkC/ngxNQQoPVrj4gVJPTvhkEhIrmEKo=
X-Received: by 10.80.139.180 with SMTP id m49mr5344963edm.36.1513124527974; Tue, 12 Dec 2017 16:22:07 -0800 (PST)
MIME-Version: 1.0
Received: by 10.80.243.1 with HTTP; Tue, 12 Dec 2017 16:22:07 -0800 (PST)
X-Originating-IP: [64.141.86.146]
Received: by 10.80.243.1 with HTTP; Tue, 12 Dec 2017 16:22:07 -0800 (PST)
In-Reply-To: <87DE6791-D273-4EE7-8F4E-F9ADE4F57FFB@mnot.net>
References: <CAPeSZfAYyU34Qfwzn7ESgGCb052uZn0SZqeDyfvpw-5du2sqKA@mail.gmail.com> <CAHBU6ivZ9zLN3Np+AYszu5TK4kv88uOHq7VvMEiyERGFhh=cnQ@mail.gmail.com> <87DE6791-D273-4EE7-8F4E-F9ADE4F57FFB@mnot.net>
From: Tim Bray <tbray@textuality.com>
Date: Wed, 13 Dec 2017 00:22:07 +0000
Message-ID: <CAHBU6itEc_6nu8z1yBz3vRztA_2eEo0yb5Zo=j-vYoLxjvmMyQ@mail.gmail.com>
To: Mark Nottingham <mnot@mnot.net>
Cc: json@ietf.org
Content-Type: multipart/alternative; boundary="94eb2c19578efdb41005602dc14c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/POr1oYhL5NjzIyvGFLvv9kfzyGo>
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:22:14 -0000
/me sighs in relief. On Dec 12, 2017 4:04 PM, "Mark Nottingham" <mnot@mnot.net> wrote: > 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/ > >