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

Phillip Hallam-Baker <phill@hallambaker.com> Tue, 19 July 2022 23:28 UTC

Return-Path: <hallam@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 C9073C157B48 for <architecture-discuss@ietfa.amsl.com>; Tue, 19 Jul 2022 16:28:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.412
X-Spam-Level:
X-Spam-Status: No, score=-1.412 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
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 U2Rk4nJTF7th for <architecture-discuss@ietfa.amsl.com>; Tue, 19 Jul 2022 16:28:31 -0700 (PDT)
Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (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 445D5C15A72F for <architecture-discuss@ietf.org>; Tue, 19 Jul 2022 16:28:31 -0700 (PDT)
Received: by mail-oi1-f181.google.com with SMTP id u76so8785310oie.3 for <architecture-discuss@ietf.org>; Tue, 19 Jul 2022 16:28:31 -0700 (PDT)
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:cc; bh=Mredmg5RNXkwfUDm9bYjWOPr6z0rFK+xKW8REBp8cvQ=; b=8Q6xNvSXEkA1wEoah/uG2W8M5feJUSoIZ4FUSewo/WyjSm4ZGknr47JsgFKZsTC//G 5H3QoPGSH+qsYPW14ukIws30dgX5KH+WCWCCqVQOMD2UoBB6VSbYlTk5csnXkJId6icq zm6lK77grGGvESQux2+VaC9ee7zCl7S0wFM37e1mC/RTzpATCeHZtw/ILnUeFyVig5pa +Bb2ZxnUz5hw72gJk092TvVqekkdKIFPPRiifWQSdHjkKYsMP9ZV1Pb8gMHDd/6/Ju1M /D5bRJXEus2QVRoEI2XtQRU6L98Zof3lj/APiEvG1uNVF2iU87Fbju6+d24aMXzxLGkh cCiQ==
X-Gm-Message-State: AJIora8dlG/srp6pX+jMcml6Hyx0XB2BFM2YlGAwA4k+VUu8GswcBZ7a NY0ujrNFKw5QSF8CTDEM8pAzk/TDEEBm/AcS9IQ=
X-Google-Smtp-Source: AGRyM1t10tqWuys/W1epnw4/SrF//36+sN0ka36sE0w8DgmJAx13gyhbeRVz/25kg6yC++Wp1+GrTmK8L6jgvTHu6nM=
X-Received: by 2002:a05:6808:124d:b0:322:3600:d84a with SMTP id o13-20020a056808124d00b003223600d84amr1037870oiv.108.1658273310434; Tue, 19 Jul 2022 16:28:30 -0700 (PDT)
MIME-Version: 1.0
References: <CAChr6Sxy66Yrr=0wnSGOUFBboFBaJsWzrWduvXep9L5akmYiNg@mail.gmail.com> <CAChr6Sx5OtZLf1c27CzV7UMfHHnRgP5pUbga0+Jij7rtzq5krw@mail.gmail.com> <CAChr6SxQV-fW9KkTEsMQ1HaU7tOKmu6Ce4DBUB2eDtCYA0YYjg@mail.gmail.com>
In-Reply-To: <CAChr6SxQV-fW9KkTEsMQ1HaU7tOKmu6Ce4DBUB2eDtCYA0YYjg@mail.gmail.com>
From: Phillip Hallam-Baker <phill@hallambaker.com>
Date: Tue, 19 Jul 2022 19:28:19 -0400
Message-ID: <CAMm+LwitigRr4F9Q1chUzDj5UqR97nkBmu3bT3yzyrQu9iUF_w@mail.gmail.com>
To: Rob Sayre <sayrer@gmail.com>
Cc: architecture-discuss@ietf.org
Content-Type: multipart/alternative; boundary="0000000000009bea5f05e430d7fe"
Archived-At: <https://mailarchive.ietf.org/arch/msg/architecture-discuss/UZiz63MY09owygUPhdjJ7-2EnRo>
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 23:28:34 -0000

I don't think discussing the history of JSON really helps much at this
stage, decisions were made and it is impractical to change them.

Insisting that the spec preclude future changes is not a choice I would
have made but all that it means in practice is that if you want to revise
the JSON spec, you have to change the name. So instead of there being one
binary version anointed as a clear successor, there are a half dozen
competing specs. Ho hum.

My dog in that particular race is JSON-B which overcomes issues such as the
loss of binary precision round tripping floats etc. and avoids the need to
Base64 encode binary data. It is a proper superset of JSON however so all
legitimate JSON is legitimate JSON-B. What this means is that a
single decoder works for JSON, JSON-B, JSON-C and JSON-D.

https://www.ietf.org/archive/id/draft-hallambaker-jsonbcd-21.html

If the committee had come up with a specification that met my needs, I
would have followed it. They didn't and so I didn't.



On Tue, Jul 19, 2022 at 6:09 PM Rob Sayre <sayrer@gmail.com> wrote:

> 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
>>>
>> _______________________________________________
> Architecture-discuss mailing list
> Architecture-discuss@ietf.org
> https://www.ietf.org/mailman/listinfo/architecture-discuss
>