Re: [Json] JSON Schema Language: extensibility and unspecified properties

Ulysse Carion <ulysse@segment.com> Tue, 20 August 2019 03:26 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 14694120233 for <json@ietfa.amsl.com>; Mon, 19 Aug 2019 20:26:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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 BtkaEdbmJDDl for <json@ietfa.amsl.com>; Mon, 19 Aug 2019 20:26:27 -0700 (PDT)
Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (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 7EE861201DB for <json@ietf.org>; Mon, 19 Aug 2019 20:26:27 -0700 (PDT)
Received: by mail-io1-xd2d.google.com with SMTP id o9so9135567iom.3 for <json@ietf.org>; Mon, 19 Aug 2019 20:26:27 -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:content-transfer-encoding; bh=SAPOfqrNzhkNieEyRCvWx0IeNrSe/PgBIf8WLgQQMCw=; b=YYfP3TGjP2DY6qa9kxv+zHLE3PHwR5hsmBUYYowZ8LIi67U+itjuXQ3MrGrx2QgTgO 96YvV4cmbQhG7MTbcjPye0Ui2qy77FFOvNT421Z9FE1S3yn+IDNR7AjMGG+rac8/81+o gmLo+6IdjJzYBIaC3dE+68xTlQvdK0039B9Lk=
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:content-transfer-encoding; bh=SAPOfqrNzhkNieEyRCvWx0IeNrSe/PgBIf8WLgQQMCw=; b=gp/s2XdLsRPxhonufUnMxJqLDOFdD6WLta0CwjIigvBn1P0rfvxv3iOHS5RRZ05JEw HeheM7T2j8eUmeYrKUOPQ/Z27RE6PW8D+wk/QdgfBjEzur/0KoRlhXOQClx8He1PlWBN S0TjRmL4Mk4KphV3S6r7ZKWwldfjND4r7TRaDGJdb/zAwCC/wM0qxtQO+QUGpiW6jMCt K9G+gZyL0qflzCztpS2BmiTH1jTIMI21TX4p+He6vOTN7P9z7tNyuiofNh1F1jSG4iZP Lw4ek0CdAlP90GX2Mb7ZU7UlXbl0kk3UhMLq6nPw1MEqnJMZQtDS0B/kGhs7M0W+bR8p FTog==
X-Gm-Message-State: APjAAAV0MSrYjIvgWVYHYZXbgvAUvGq/Q0sAsRVkz5Jw2dRqNzDFlpwB 6g2Cl31JjuvpsDVJ9NBwuLkpxcQEDlRc4F8KkZxK0g==
X-Google-Smtp-Source: APXvYqzQz2Dsq6a1DKk0JWmYXq6P/QFH06SkBenindg79ZSJTCT5UngmrpnmRZ3SKLsgT+tUnCeR7J/OUd5aao6Rmd8=
X-Received: by 2002:a5d:9747:: with SMTP id c7mr16469196ioo.244.1566271586679; Mon, 19 Aug 2019 20:26:26 -0700 (PDT)
MIME-Version: 1.0
References: <CAJK=1RhXp85cz-pOAQPw2JM=CYHgGSygj4Hw0spht56jbzQE2g@mail.gmail.com> <53094378-B559-49E1-B42B-54FBA8BC35AA@tzi.org> <CAJK=1Rj6Q3CvpF9aYML=47SF_XP49=O2hLhcBo8gZCb73C0RAw@mail.gmail.com> <FDB93E41-9D7D-4BF2-8D01-F4D075774848@tzi.org> <CAJK=1RiE_+nHkeB77DericN498w1v9mf2hsBgnQtgsZTVM9N9A@mail.gmail.com> <118F844A-453D-497D-8107-CF2BD05AC313@tzi.org> <CAJK=1Rgqek+rh+dj2xNWD7WKS48oQoHiqhj5dDT2D3dD7OZs1Q@mail.gmail.com> <CALH+fvpwM1hRByXv1y0UwUYPwKcb2JZT4v5qqZVeySFvEo-Z7A@mail.gmail.com> <CAJK=1RjJUzrpL+=t+5sXAnkYBDKpNazZCViY=PZt7qFFcN2t3g@mail.gmail.com> <CALH+fvqsn_purpNR8KHRe9GtdVizzDCbOSDTK8SMJc-8of-x8w@mail.gmail.com>
In-Reply-To: <CALH+fvqsn_purpNR8KHRe9GtdVizzDCbOSDTK8SMJc-8of-x8w@mail.gmail.com>
From: Ulysse Carion <ulysse@segment.com>
Date: Mon, 19 Aug 2019 20:26:15 -0700
Message-ID: <CAJK=1RjFaopyCWonU8kgkhowWzB8KXdVNQp_W+A3S7XFdz0fsg@mail.gmail.com>
To: Richard Gibson <richard.gibson@gmail.com>
Cc: Carsten Bormann <cabo@tzi.org>, JSON WG <json@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/e9cuC254nbggOR4CuKA0V80dCmM>
Subject: Re: [Json] JSON Schema Language: extensibility and unspecified properties
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, 20 Aug 2019 03:26:29 -0000

> An "int53" type or other means of requiring that a JSON number have zero fractional part and magnitude no greater than 2^53.

Ah -- in that case, I think it fails the other part of the criterion I
put forward: having "a clear mapping to programming languages in
widespread use today." In case the language is unclear, my thinking
was that both (1) and (2) need to be satisfied for something to be
included in the spec.

At least on my view, int53's correspondence is unclear -- should it be
a double/f64, or a long/int64_t, with a runtime check to make sure
it's in-bounds? That's not very idiomatic. Better, in my view, to
stick to uncontroversial things?

On Mon, Aug 19, 2019 at 5:52 PM Richard Gibson <richard.gibson@gmail.com> wrote:
>
> An "int53" type or other means of requiring that a JSON number have zero fractional part and magnitude no greater than 2^53.
>
> On Mon, Aug 19, 2019 at 4:46 PM Ulysse Carion <ulysse@segment.com> wrote:
>>
>> > But is the portability argument not sufficient for including such a constraint, as it was for I-JSON?
>>
>> What constraint are you referring to here?
>> On Sun, Aug 18, 2019 at 6:32 PM Richard Gibson <richard.gibson@gmail.com> wrote:
>> >
>> > On Sat, Aug 17, 2019 at 9:35 PM Ulysse Carion <ulysse@segment.com> wrote:
>> >>
>> >> no mainstream language I know of has support for integers strictly up to 2^53
>> >
>> >
>> > From a certain point of view, nearly all mainstream languages do so, because that is the maximum value in the range of contiguous IEEE 754 binary64 integers and thus the upper bound on portable integers (which is why RFC 7493 section 2.2 limits I-JSON numbers to being strictly less than it). But you're right that languages have no int53-specific type, because those with specific integer types have at least the larger range of int64 and those without them have the larger reduced-precision range of binary64. But is the portability argument not sufficient for including such a constraint, as it was for I-JSON?