Re: [arch-d] draft-iab-protocol-maintenance / JSON feedback

Rob Sayre <sayrer@gmail.com> Tue, 19 July 2022 22:09 UTC

Return-Path: <sayrer@gmail.com>
X-Original-To: architecture-discuss@ietfa.amsl.com
Delivered-To: architecture-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 46FAAC131922 for <architecture-discuss@ietfa.amsl.com>; Tue, 19 Jul 2022 15:09:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 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, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=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 jErqA8pe49S2 for <architecture-discuss@ietfa.amsl.com>; Tue, 19 Jul 2022 15:09:36 -0700 (PDT)
Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (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 383E6C131924 for <architecture-discuss@ietf.org>; Tue, 19 Jul 2022 15:09:33 -0700 (PDT)
Received: by mail-ej1-x62c.google.com with SMTP id oy13so29706713ejb.1 for <architecture-discuss@ietf.org>; Tue, 19 Jul 2022 15:09:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=EPupTL6wzXRKz2tL3WRCCymd3AUmNeyKFx1PNrEmYo0=; b=YUa8YhUuRU0qmuaPGl+4xNg/lG6eQ42u0+7sG3dYlz05AvTcu/IqvtLC9olaiCIUnL enebhL1WV7zhBTU+2x+amMOXVhY8CVl3Rv43OgmCjXy8Td0bmXvUwsCD7zCYVeahz6vZ OnlLjSurhs20vbxH0TXsNS5DGIpjgcMLon8PfpXk6t6il2p8x+/6QH+7oBzUx/03ncfP Srr+eCBL7AVjCIbFby78+8fATbiKsh6MlmcLTgCvmu55SK4sy1aS+2iKTZF4OioXpMLg EHQpYPy/9UH5kozQAuQujkbgk6AJ31rdZ9J3uUKFu+NlJO7WKyokwYkQjhwzDoDLJB6g 7uIg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=EPupTL6wzXRKz2tL3WRCCymd3AUmNeyKFx1PNrEmYo0=; b=L/BcUyFTIcW7/1P006Pk6QRr+dDxo802sIU/2fJFMiuTbLxoioOS42fKa7xSPKtBCD vNnTwmIr6PGX2BEeZhYJM0CmQ6BAOKRL3g7MXVS1MBGIul0veSNuInz8CWlvAXXIZqRs WAos7OCHU7VPJR70RxMUKgxVgImvA4J01JF2cR6BVG9SlCnf18hBhyYqefGoBnAQ2Y4f peiFN5ZFIOl8khRcrf1iLjqzVIZAOEWZz+eNnmfutpSGROBU7oTwftwMsFRNaGrKPI2a oBth/VMPRFxhoOHDI+yHG9Au7O3/+rg5SG2CDUBPpOF/yGacXl4lTsmWFglrlO6NEKEk TFkA==
X-Gm-Message-State: AJIora++z5bNVix1BiqmPZA+rrzaVOIn8VnM/k2WlbjpXUpHqf3dXs35 e/JBE6zm+ySyzxi4ura1XirkEAlOTaiFHrAM3OmpnJUSRio=
X-Google-Smtp-Source: AGRyM1ttP4X69zuj+bea1o1ksrCB9xdmOP3/+s4zlsoSGFt8enKW8anZum1tEvgkEu+h9BlZdTCngjHeRgMi/0/qGXs=
X-Received: by 2002:a17:907:7617:b0:72b:49fe:fdf7 with SMTP id jx23-20020a170907761700b0072b49fefdf7mr34194817ejc.25.1658268571313; Tue, 19 Jul 2022 15:09:31 -0700 (PDT)
MIME-Version: 1.0
References: <CAChr6Sxy66Yrr=0wnSGOUFBboFBaJsWzrWduvXep9L5akmYiNg@mail.gmail.com> <CAChr6Sx5OtZLf1c27CzV7UMfHHnRgP5pUbga0+Jij7rtzq5krw@mail.gmail.com>
In-Reply-To: <CAChr6Sx5OtZLf1c27CzV7UMfHHnRgP5pUbga0+Jij7rtzq5krw@mail.gmail.com>
From: Rob Sayre <sayrer@gmail.com>
Date: Tue, 19 Jul 2022 15:09:20 -0700
Message-ID: <CAChr6SxQV-fW9KkTEsMQ1HaU7tOKmu6Ce4DBUB2eDtCYA0YYjg@mail.gmail.com>
To: architecture-discuss@ietf.org
Content-Type: multipart/alternative; boundary="00000000000022aad805e42fbd19"
Archived-At: <https://mailarchive.ietf.org/arch/msg/architecture-discuss/OVcj1_yHvG8uPCikDVKySA4ZJ-0>
Subject: Re: [arch-d] draft-iab-protocol-maintenance / JSON feedback
X-BeenThere: architecture-discuss@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: open discussion forum for long/wide-range architectural issues <architecture-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/architecture-discuss>, <mailto:architecture-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/architecture-discuss/>
List-Post: <mailto:architecture-discuss@ietf.org>
List-Help: <mailto:architecture-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/architecture-discuss>, <mailto:architecture-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 19 Jul 2022 22:09:40 -0000

I got asked about this in private, and found this page:

https://esdiscuss.org/topic/json-parser-grammar#content-6

This is a 2009 email from me to the editor of the ES spec. So, all of the
loose/strict negotiations were actually done in ECMA. This is the key text
in RFC 4627 that the ECMA group ignored: "A JSON parser MAY accept non-JSON
forms or extensions." We all agreed to not do it. That's only 4-5 clients,
but they were popular ones.

I agree that the later IETF documents diverge from the ECMA ones, but this
is because of a disagreement on how much the semantics of JS should
influence JSON, and not the subject of this IAB document. So, that's why
it's a bad example.

thanks,
Rob


On Mon, Jul 18, 2022 at 10:11 AM Rob Sayre <sayrer@gmail.com> wrote:

> Hi,
>
> After reading all of these comments, which each contain some correct
> statements, I still think the JSON example is a bad one.
>
> Some corrections, as someone who was in both ECMA, the IETF, and the
> pre-history:
>
> - there are no comments deliberately, as Crockford thought people would
> use them for extensions
> - the number precision issue was widely known (Crockford even designed a
> thoughtful number format called DEC64, he definitely knew)
> - the comma issue was raised by me, but rejected. it wasn't an oversight
> that the process missed
>
> I did manage to get one point across: the design of JSON.stringify makes
> it difficult to produce invalid JSON. The original API let implementations
> insert arbitrary text.
>
> The standardization process was basically: "OK, people like this, but we
> can't have them using eval()".
>
> I also raised the point that JSON necessarily implies ECMA262 semantics
> for hashmaps and other things, in the IETF process (again, rejected, but
> not an oversight).
>
> thanks,
> Rob
>
>
> On Sun, Jul 17, 2022 at 2:56 PM Rob Sayre <sayrer@gmail.com> wrote:
>
>> Hi,
>>
>> I'm sympathetic to concerns raised in the document, but I think the JSON
>> example is not a very good one.
>>
>> JSON was deliberately underspecified because it would work most of the
>> time* in languages where typical payloads could get by using an "eval()"
>> function, rather than requiring an implementation at all, JavaScript and
>> Python being the most common. RFC4627 was an after-the-fact production, the
>> problems were already there.
>>
>> So, the JSON case is actually showing that loose specification can drive
>> adoption (like HTML etc). I do not think that's the point you intended to
>> make.
>>
>> thanks,
>> Rob
>>
>> * the problems mentioned in the draft are real, but rare and often not
>> obvious
>>
>