Re: [Json] JSL: Clarifying purpose, and renaming it to JDDF

Carsten Bormann <cabo@tzi.org> Thu, 29 August 2019 08:33 UTC

Return-Path: <cabo@tzi.org>
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 42852120124 for <json@ietfa.amsl.com>; Thu, 29 Aug 2019 01:33:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.198
X-Spam-Level:
X-Spam-Status: No, score=-4.198 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
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 K4JxLR0ypq0r for <json@ietfa.amsl.com>; Thu, 29 Aug 2019 01:33:31 -0700 (PDT)
Received: from gabriel-vm-2.zfn.uni-bremen.de (gabriel-vm-2.zfn.uni-bremen.de [134.102.50.17]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 056721200CC for <json@ietf.org>; Thu, 29 Aug 2019 01:33:31 -0700 (PDT)
Received: from [192.168.217.110] (p548DCCB9.dip0.t-ipconnect.de [84.141.204.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-vm-2.zfn.uni-bremen.de (Postfix) with ESMTPSA id 46JwqY3pGSzyY5; Thu, 29 Aug 2019 10:33:29 +0200 (CEST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <SY2PR01MB2764EDAB3DD01417A95A26D5E5A20@SY2PR01MB2764.ausprd01.prod.outlook.com>
Date: Thu, 29 Aug 2019 10:33:28 +0200
Cc: Ulysse Carion <ulysse@segment.com>, JSON WG <json@ietf.org>
X-Mao-Original-Outgoing-Id: 588760406.3132989-e5f6382d006c1476d9907f7058923e5e
Content-Transfer-Encoding: quoted-printable
Message-Id: <4644E5BE-096F-44BA-84DF-1EE74761ED9D@tzi.org>
References: <CAJK=1Rj6zW_MffKvsOiQh28KY5yDeoALGSYqve+vGj52s1Owag@mail.gmail.com> <SY2PR01MB2764EDAB3DD01417A95A26D5E5A20@SY2PR01MB2764.ausprd01.prod.outlook.com>
To: "Manger, James" <James.H.Manger@team.telstra.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/DWMLk4N2LfYI6IciDohgp0MR_CA>
Subject: Re: [Json] JSL: Clarifying purpose, and renaming it to JDDF
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: Thu, 29 Aug 2019 08:33:32 -0000

> Suggested extra types:
> * "type": "intString" -- an integer exchanged in decimal notation as a JSON string, with no decimal point or exponent. (maybe only offer "int64String" instead, if it is only 64-bit values that typically use this format)
> * "type": "uintB64u" -- a (non-negative) integer (potentially huge, as often used in cryptography) exchanged as a JSON string holding the base64url-encoding (without padding) of an unsigned big-endian representation of the integer. (may need a comment about gracefully accepting leading 0 bytes).
> * "type": "bytesB64" -- a byte array exchanged as a JSON string holding its base64-encoding
> * “type": "bytesB64u" -- a byte array exchanged as a JSON string holding its base64url-encoding (without padding)

The list sounds good (I’m assuming byesB64 is base64 classic (Section 4 of RFC 4648) with padding); the names are a bit unwieldy — and give away the following observation:

This mixes application type (int, uint, bytes) with representation (there already is another representation in use for int and uint, and this adds two alternative representations for bytes).  Of course it is OK to mix the two (generate the product of possibilities), but it also can help to separate the two (and add a range constraint as a third, while uint8 does this so succinctly?).

Grüße, Carsten