Re: [Json] [Technical Errata Reported] RFC8259 (7673)

"Peter F. Patel-Schneider" <pfpschneider@gmail.com> Wed, 11 October 2023 15:23 UTC

Return-Path: <pfpschneider@gmail.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 83682C151531 for <json@ietfa.amsl.com>; Wed, 11 Oct 2023 08:23:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.197
X-Spam-Level:
X-Spam-Status: No, score=-2.197 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.091, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VoMsOcXl0pyd for <json@ietfa.amsl.com>; Wed, 11 Oct 2023 08:23:55 -0700 (PDT)
Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E4FE1C15109C for <json@ietf.org>; Wed, 11 Oct 2023 08:23:49 -0700 (PDT)
Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-77386822cfbso468564585a.0 for <json@ietf.org>; Wed, 11 Oct 2023 08:23:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697037828; x=1697642628; darn=ietf.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iKO8Yu11XFB6PKp0V2eXE1Ea4DgWHGAS0j/aZ1Anhek=; b=h4tZV8zeSDDJJPn11Zp+PhVUQ3V0v+49oGRbeCdHelT63S2ec2jGPa2bjMzNlKKU3C VozDJoTHs8LPMlftGUSjBU+rQKJ1DhUKY3xRZ0IeUg2U3ahv8XVlnXqkfICHVMRauwOO ULkIxlRgpEYq3o04bJS4AXaFe5mZj8til2//OV8LsbrXAAI7umD2JaFnmlhOqgHicdZp FFLOmfqJ4XgQjLVVj8aNGDAUVm9TKNBGlunAHA88hJYR6eJJbUsroVHrDt8BL35wD3ED ZOuxUqZqCqt2Mx/6LJkIPKJbX7qfZbM6dCAC+abhQSiJwhtjzd5LUtYN9LBtcV8HItdW KqXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697037828; x=1697642628; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iKO8Yu11XFB6PKp0V2eXE1Ea4DgWHGAS0j/aZ1Anhek=; b=vH514qAAI3qGA2Y2tNd8PZwJNvDFPb4jd7+q8FUe9QgnYrsnZBA2nYRVX+v+FIBWg6 bCzFKVLY7DfNQun8cqeS3lUXjeGvp7iOxT5uT3ohz6yRah+m7Dc5t2tNjPZbTT6vm5Ni daAr2TY/Lj9Me/nKVpR8ocV/JccVK5hwTRnVxIzTx7Y0B7JAiuchJp11UccIxUPTYRDV DQ7hGP6e4QpeMNea8is5ce+kRjCUlkAGaGJxI3MEIQGi0yPpoEWUfVINgkM1VB7GTWid Mb1ujUdWawkJKzQb2xlzqOjT6dh1fu2FRG4Jc/cdVfaqjd5OS6aXpNHEOD0qfpf3I+uI mmlg==
X-Gm-Message-State: AOJu0YyIidGFdnrMVcx8t+i1YjAzwqm8ELA6FK0l96AuopCaSFG7+m9b YF7NcqPPelJL9gtxqQkGn2owDVXUYdQ=
X-Google-Smtp-Source: AGHT+IGOY9iU7K9uvj5LqZPwuCL9G3kOMQLC/ikw6UVmJ+HN7i/W9OAT2xzzY4XHuQwl09K3APx3iQ==
X-Received: by 2002:ae9:f712:0:b0:775:6e1f:df5b with SMTP id s18-20020ae9f712000000b007756e1fdf5bmr20144100qkg.38.1697037828024; Wed, 11 Oct 2023 08:23:48 -0700 (PDT)
Received: from [192.168.0.27] ([204.237.48.1]) by smtp.gmail.com with ESMTPSA id x17-20020ae9f811000000b007757fefea79sm5211285qkh.130.2023.10.11.08.23.47 for <json@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Oct 2023 08:23:47 -0700 (PDT)
Message-ID: <7b158d11-6472-e3d9-8745-48c0d8f8f503@gmail.com>
Date: Wed, 11 Oct 2023 11:23:46 -0400
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1
Content-Language: en-CA
To: json@ietf.org
References: <20231011065619.82BC5E6D69@rfcpa.amsl.com> <CE22DEB9-FA3A-439B-A4CD-79138DBB18A5@cursive.net> <CAHBU6is2zYR8V-BK8_OVe8iWhfxRym=+=4s1X26e1kfJzOWGdg@mail.gmail.com> <CAHBU6ismHz2bo6zUVeJ5cvDtz=VM=4_Ef_RSa0_oSnjFWwKUkw@mail.gmail.com>
From: "Peter F. Patel-Schneider" <pfpschneider@gmail.com>
In-Reply-To: <CAHBU6ismHz2bo6zUVeJ5cvDtz=VM=4_Ef_RSa0_oSnjFWwKUkw@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/x3F5NEH-zRV0aHImWAxcFvL9Sjw>
Subject: Re: [Json] [Technical Errata Reported] RFC8259 (7673)
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.39
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, 11 Oct 2023 15:23:59 -0000

It would be reasonable to improve the wording in the RFC to make it align 
better with the wording in other places, i.e., use "and the control characters 
U+0000 through U+001F" instead of "and the control characters (U+0000 through 
U+001F)".  Whether this change is worth an errata is a separate issue.

peter


On 10/11/23 11:16, Tim Bray wrote:
> Oh, and as I didn’t say, while the erratum is reasonable, I think it’s a reject.
> 
> On Oct 11, 2023 at 8:14:24 AM, Tim Bray <tbray@textuality.com 
> <mailto:tbray@textuality.com>> wrote:
>> Well, this is a strange one.  All the specs for JSON have said the same 
>> thing, and the thing they’ve said is kind of stupid. The requested change is 
>> to add U+7F DEL to the list of characters that MUST be escaped.
>>
>> However, I created a document containing one field containing only a single 
>> U+7F, it is available at https://www.tbray.org/tmp/del.json 
>> <https://www.tbray.org/tmp/del.json>, and it seems to be legal JSON.  So, in 
>> fact, while DEL should have been included in the must-escapes, the world’s 
>> software has learned to live with it not being escaped.
>>
>> Note that this file does not display correctly.
>>
>>  ~ % curl https://www.tbray.org/tmp/del.json 
>> <https://www.tbray.org/tmp/del.json> | jsonlint
>>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>>                                  Dload  Upload   Total   Spent    Left  Speed
>> 100    23  100    23    0     0    224      0 --:--:-- --:--:-- --:--:--   237
>> {
>>   "example": ""
>> }
>>
>> FWIW, those who care about such issues may be interested in 
>> https://datatracker.ietf.org/doc/draft-bray-unichars/ 
>> <https://datatracker.ietf.org/doc/draft-bray-unichars/> currently under 
>> discussion in the art@ and i18ndir@ mailing lists.
>>
>>
>> On Oct 11, 2023 at 7:17:00 AM, Joe Hildebrand <hildjj@cursive.net 
>> <mailto:hildjj@cursive.net>> wrote:
>>> Suggested resolution: reject
>>>
>>> RFC 8259's ABNF is quite clear that these codepoints are allowed: 
>>> "unescaped = %x20-21 / %x23-5B / %x5D-10FFFF"
>>>
>>> ECMA-404 agrees: "the control characters U+0000 to U+001F".
>>>
>>> json.org <http://json.org>'s wording is awkward, but still clear: "any of 
>>> the Unicode code points except the 32 control codes and "double quote"
>>>
>>> Here is some JS to prove it got implemented this way:
>>>
>>> ```
>>> JSON.parse('"\x7f"')
>>> ```
>>>
>>> The approach in the errata might have been the correct one to have been 
>>> specified, but it wasn't.  Even if we had wanted to make this change, it 
>>> was far too late by the time RFC 4627 was written.
>>>
>>> —
>>> Joe Hildebrand
>>>
>>>> On Oct 11, 2023, at 12:56 AM, RFC Errata System <rfc-editor@rfc-editor.org 
>>>> <mailto:rfc-editor@rfc-editor.org>> wrote:
>>>>
>>>> The following errata report has been submitted for RFC8259,
>>>> "The JavaScript Object Notation (JSON) Data Interchange Format".
>>>>
>>>> --------------------------------------
>>>> You may review the report below and at:
>>>> https://www.rfc-editor.org/errata/eid7673 
>>>> <https://www.rfc-editor.org/errata/eid7673>
>>>>
>>>> --------------------------------------
>>>> Type: Technical
>>>> Reported by: Zachary Collier (Zamicol) <zachmcollier@gmail.com 
>>>> <mailto:zachmcollier@gmail.com>>
>>>>
>>>> Section: 7
>>>>
>>>> Original Text
>>>> -------------
>>>> The representation of strings is similar to conventions used in the C family
>>>> of programming languages.  A string begins and ends with quotation marks. All
>>>> Unicode characters may be placed within the quotation marks, except for the
>>>> characters that MUST be escaped: quotation mark, reverse solidus, and the
>>>> control characters (U+0000 through U+001F).
>>>>
>>>> Corrected Text
>>>> --------------
>>>> The representation of strings is similar to conventions used in the C family
>>>> of programming languages.  A string begins and ends with quotation marks.  All
>>>> Unicode characters may be placed within the quotation marks, except for the
>>>> characters that MUST be escaped: quotation mark, reverse solidus, and the
>>>> control characters (U+0000 through U+001F, U+007F, and U+0080 through
>>>> U+009F).
>>>>
>>>>
>>>> Notes
>>>> -----
>>>> There are 33 7-bit control characters, but the JSON RFC only listed 32 by
>>>> omitting the inclusion of the last control character in the 7-bit ASCII range,
>>>> 'del.'  However, JSON is not limited to 7-bit ASCII; it is Unicode.  Unicode
>>>> encompasses 65 control characters from U+0080 to U+009F, totaling an 
>>>> additional
>>>> 32 characters.  The section that currently reads "U+0000 through U+001F" 
>>>> should
>>>> include these additional control characters reading as "U+0000 through U+001F,
>>>> U+007F, and U+0080 through U+009F"
>>>>
>>>> Instructions:
>>>> -------------
>>>> This erratum is currently posted as "Reported". If necessary, please
>>>> use "Reply All" to discuss whether it should be verified or
>>>> rejected. When a decision is reached, the verifying party
>>>> can log in to change the status and edit the report, if necessary.
>>>>
>>>> --------------------------------------
>>>> RFC8259 (draft-ietf-jsonbis-rfc7159bis-04)
>>>> --------------------------------------
>>>> Title               : The JavaScript Object Notation (JSON) Data 
>>>> Interchange Format
>>>> Publication Date    : December 2017
>>>> Author(s)           : T. Bray, Ed.
>>>> Category            : INTERNET STANDARD
>>>> Source              : Javascript Object Notation Update
>>>> Area                : Applications and Real-Time
>>>> Stream              : IETF
>>>> Verifying Party     : IESG
>>>>
>>>> _______________________________________________
>>>> json mailing list
>>>> json@ietf.org <mailto:json@ietf.org>
>>>> https://www.ietf.org/mailman/listinfo/json 
>>>> <https://www.ietf.org/mailman/listinfo/json>
>>>
> 
> _______________________________________________
> json mailing list
> json@ietf.org
> https://www.ietf.org/mailman/listinfo/json