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

Anders Rundgren <anders.rundgren.net@gmail.com> Wed, 31 July 2019 05:02 UTC

Return-Path: <anders.rundgren.net@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 721CF120075 for <json@ietfa.amsl.com>; Tue, 30 Jul 2019 22:02:55 -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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B0xFnQrdTvsC for <json@ietfa.amsl.com>; Tue, 30 Jul 2019 22:02:53 -0700 (PDT)
Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (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 7AD82120019 for <json@ietf.org>; Tue, 30 Jul 2019 22:02:53 -0700 (PDT)
Received: by mail-wr1-x42f.google.com with SMTP id 31so68135229wrm.1 for <json@ietf.org>; Tue, 30 Jul 2019 22:02:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=v62x5DUVZiBATuhARsur5NuG8Pr5s8gW4nZPoqFFh6I=; b=O0vAUW/pl8KQFKItix7xOli8giq+YnRwp5qtbkyYQso8glrNrwUzi1C4UB/Py+WfBT 1KTikKQ7Nto0mheC0WxgVbxjp/58ndQCKzViTJL3ycwG1xkfyYzGFkRzZ4iAvhJtP8mi L7Fx/Sc416PkJsvdAmstKJXWiCS6LOMxAZxqeD/WgC475+/y5uZVxuUz61qKFp+rLqUi aQ1jd5wNSa1uXmgdq5yuFqKZdEGlu94N5abXuA3Uec+RUsSYnmb6fBnVCm/2ZGNENExM 4MBg5w9t7rUjzpyamUJzufp9yi4Nfb1P/KdvEuegl4NF8QMXU3Lkp4RZqnCwjbaPImdV aphA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=v62x5DUVZiBATuhARsur5NuG8Pr5s8gW4nZPoqFFh6I=; b=YFIegG+G7bjQwxIqIaspIXernap6I9As2iwrie6lw4Uhna9iUs74NDBhvP1fcueaQR gy0QwQCDmE/qaqgGgIbaVlg6KdHxC6UFigfRE1f2xu/9emmcKTHaKFYlT62u4DrjMlXV syHAlgLeles2c+TjEmSE4lB4kpC9iTmM19QhI2UR/jdD4fEjHyFp5i19rdHMHJ05MksK DU5ws5anVKXCYQWeGfL5cZ5IFGAOoSoVMuWZQb/Rbc117R9zIH2OQbVSfxfP1EnhNs04 Zy9idGMFCG2/pRSW4Bu+UrxADvKmMB7QzuJe/jHpG+ZJMOop02FU8a3MJ70nIcsP4okL euUA==
X-Gm-Message-State: APjAAAWe9I2DzgHpADmHtR1M7C0yUj0+qBt5ZVaGH/6DhYkcqgLQjy09 gYOur6tEviWBsdH0X6m38J4buXmm
X-Google-Smtp-Source: APXvYqyG9lqr7g+HVTEKIs28gPqZJBZtD9ogVV3nfLsK+mUGBi18obggW0pJ9npapZCnNlm5WCFkWA==
X-Received: by 2002:a5d:6182:: with SMTP id j2mr83405510wru.275.1564549371388; Tue, 30 Jul 2019 22:02:51 -0700 (PDT)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id g12sm98004644wrv.9.2019.07.30.22.02.50 for <json@ietf.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jul 2019 22:02:50 -0700 (PDT)
To: JSON WG <json@ietf.org>
References: <SY2PR01MB27642C6983E387C397B11581E5DD0@SY2PR01MB2764.ausprd01.prod.outlook.com> <CAJK=1RjhuCYJe4-BSB++8+-dHG3LV8TdqsnFEPAoAkfJ1mOE3A@mail.gmail.com> <SY2PR01MB2764AD4523625006B1F3DFEBE5DC0@SY2PR01MB2764.ausprd01.prod.outlook.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <aeb4dfcc-4227-2d8e-d1dc-914d078450fe@gmail.com>
Date: Wed, 31 Jul 2019 07:02:47 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <SY2PR01MB2764AD4523625006B1F3DFEBE5DC0@SY2PR01MB2764.ausprd01.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/ZQS7lp0Ks_QYr7B2EBk7m1kHv1s>
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: Wed, 31 Jul 2019 05:02:56 -0000

Dropping int64 is hardly an option, neither is BigInteger.   int53 is a special that for example fits UNIX "epoch".

The purpose of fixed sized integers in data formats is not to save bytes, it is about valid ranges and compatibility with languages like Java and C++.

Arbitrarily sized integers are used by tons of applications based on JSON messaging and is available for most platforms including JS.

The monetary type is an item of its own.

That there are multiple ways of formatting integers in JSON is unfortunately a reality all JSON tool maker must (in some way) address.

I would reverse the integer syntax and claim that integers SHOULD conform to standard integer (not JSON) syntax since a standard should not break the multitude of JSON tools that already implement this.
A scheme author who thinks this is "wrong" should use "number" giving them the whole JSON number syntax.

Anders