Re: [Json] JSON Schema Language is nearly done: int53

Ulysse Carion <ulysse@segment.com> Tue, 30 July 2019 04:09 UTC

Return-Path: <ulysse@segment.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 4A140120019 for <json@ietfa.amsl.com>; Mon, 29 Jul 2019 21:09:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=segment.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 pJZEQQu1yhPY for <json@ietfa.amsl.com>; Mon, 29 Jul 2019 21:09:14 -0700 (PDT)
Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (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 6C01712000F for <json@ietf.org>; Mon, 29 Jul 2019 21:09:14 -0700 (PDT)
Received: by mail-io1-xd34.google.com with SMTP id m24so125114724ioo.2 for <json@ietf.org>; Mon, 29 Jul 2019 21:09:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=segment.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Me3qBscSY5WaITfc1vV3NcIv0v/c2YTU1Ww8TIryEpM=; b=UvohFzyXansSkiI17iRL/1teGgFNU6aKn1UKhO/YYoGT3RKPdZRpuOGOB9mng3Dozh BH/+DTwfR8b2cETkwZaSrXYxlpplHXHG5k6VOh+nD52UJ5HxJa8LE8sUwKTNJr4WqBiO fn3SnqagHDQv0RvwLITcZmsZ4gucnlFu+rzM8=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Me3qBscSY5WaITfc1vV3NcIv0v/c2YTU1Ww8TIryEpM=; b=pMEHa+9gguYhQRpDySQ8Tdd9upYxFZV+8BoUE2ZZrZaonX0dy5TXtY8Jh1t7zweW0I izJot7JSM+obSZc5zAkGeBoOF1qkr8S8wu3VQv5jYPjILGijqZ7sBELDbty/CkGuXGCS biqyRV3XX+z0N+rgzwj4p00tUKF+9uhxKZ1B2WEYfdyn3jMXRkNj/ASWaKS0b4fbPc2c DxNJwvBKGgq7lTxces4vb/2YOdsOPrMPW1GvVNJl6kOYtKkllichPcmYBZ19jSwVBWxm 2xTIzTRAY6dl3a0xVHikP4JISGrUWcs8Zn2x56P/Pca+fk3RALir7gr1srPRI19q34qT iclQ==
X-Gm-Message-State: APjAAAXeowIPahd1g4wi90gVwX5a/woUWlpf9F8g/MFI7fRHdkYsgBAK VX3nf+pvU4HgPBX8ctiZOPkSXWTUr0Akb6PKEL+u1w==
X-Google-Smtp-Source: APXvYqy9Dw2NYF/YVcMKzrVG3J11XPbI1l2TrSRiUOssKjoTGfoWkfxDPGJJAQ7OnRvn70dJWPuIs61fb2A+8x5ZewI=
X-Received: by 2002:a02:5185:: with SMTP id s127mr46891696jaa.44.1564459753657; Mon, 29 Jul 2019 21:09:13 -0700 (PDT)
MIME-Version: 1.0
References: <SY2PR01MB27642C6983E387C397B11581E5DD0@SY2PR01MB2764.ausprd01.prod.outlook.com>
In-Reply-To: <SY2PR01MB27642C6983E387C397B11581E5DD0@SY2PR01MB2764.ausprd01.prod.outlook.com>
From: Ulysse Carion <ulysse@segment.com>
Date: Mon, 29 Jul 2019 21:09:02 -0700
Message-ID: <CAJK=1RjhuCYJe4-BSB++8+-dHG3LV8TdqsnFEPAoAkfJ1mOE3A@mail.gmail.com>
To: "Manger, James" <James.H.Manger@team.telstra.com>
Cc: JSON WG <json@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000e1f252058ede2bfc"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/Ih0pBX_YvLsjMgfhd8hYemGMVq0>
Subject: Re: [Json] JSON Schema Language is nearly done: int53
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 30 Jul 2019 04:09:16 -0000

Perhaps int53 is a footgun for reasons similar to int64? Folks in practice
might pretend int53 is int64 for all intents and purposes, incurring the
same problems.

In the interest of keeping the spec small, safe, and unsurprising, I think
simply removing int64/uint64, but preserving the other types (including
less common ones like int8) may be the best option. I'd rather not
arbitrarily leave out powers of two or particular signed/unsigned variants,
nor leave in features which make it likelier that people make faulty
assumptions about interoperable JSON.

On Sun, Jul 28, 2019 at 6:02 PM Manger, James <
James.H.Manger@team.telstra.com> wrote:

> > Given that introducing int64 as a JSON number type would be a footgun
> for many sorts of applications, I agree it should be changed.
>
> >
>
> > How would you feel about simply removing int64/uint64, but otherwise
> keeping everything else as-is? I don't know if adding "native" support for
> string-represented bigints is a great idea, as there are so many different
> options. Smaller specs are the ones most frequently implemented correctly
> and securely.
>
>
>
> Just removing int64/uint64 is ok. I’d prefer to have int53. It covers all
> integer cases that work sensibly. Other options (int8, unit32, etc) are
> merely nice-to-have hints that could be omitted for a smaller spec.
>
>
>
> --
>
> James Manger
>