From nobody Mon Jan 25 19:32:03 2021
Return-Path: <Darrel.Miller@microsoft.com>
X-Original-To: httpapi@ietfa.amsl.com
Delivered-To: httpapi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
 by ietfa.amsl.com (Postfix) with ESMTP id 425793A1B4D
 for <httpapi@ietfa.amsl.com>; Mon, 25 Jan 2021 19:32:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.449
X-Spam-Level: 
X-Spam-Status: No, score=-0.449 tagged_above=-999 required=5
 tests=[DKIMWL_WL_HIGH=-0.25, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
 DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=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=microsoft.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 PjIHdP6bM9bU for <httpapi@ietfa.amsl.com>;
 Mon, 25 Jan 2021 19:31:59 -0800 (PST)
Received: from NAM06-DM3-obe.outbound.protection.outlook.com
 (mail-dm3nam06on0057.outbound.protection.outlook.com [104.47.54.57])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by ietfa.amsl.com (Postfix) with ESMTPS id 8C8FC3A1B4A
 for <httpapi@ietf.org>; Mon, 25 Jan 2021 19:31:59 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=TDUvA8I1sWWxeWCi+KjuIZDryZqFqaG3v3dOEDJcucUuijhEDm/26gV+6l28SFHr+ij4XUHIcvFqKwb23y16oMi5Xi1ZhqK3bg0SNeCwO6L6KndtDHaQPE3XB+QcWWLtTYSJybPsnieq5cmPSvtXOd9cxVKZJyW2Y+5omBVcIofz9AVLJRQhwENHNCP6H4UQcCdE9wqg+QJ2XylRigWoglKvoDW3u9+/RdamSPYSxMoegwyhB1RYnxFIO0w3jsQb6cc8H8YBQNSKpD6HysQWcHxOT+/gVf+86hzy7x5GVSGlfhUpMt8qUfWpYfjUe+k18SMFtpMR9k8xtK4ox83X7Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=vfNzwhwD9Te4Ktrjs/M9mDye21CFl3Fk0pqrkpP4jgc=;
 b=Z7FZaVIVvXLZSYDpT4EcA0y2XTSYjgblvVeyReBFX0IbefRjwB/zsgykEhezmF1+QIecSQKlWuY7OQIQMQwl5DzkbdKcMzyZzhRBxADNAzZjlw/ZRqikNINOkSERsoie+q46WoUINjDLOvrTa2Srv2HrR5Ahk4i7m0fdSgIkuPhgQZk/iUjxHeLhtBADeLmvc2+hUqo8VXpZbkX53Y42sfcnBtfMBn5HI/pFBkd1qZdPkeascbIA77gaLAkgXGtXufZ0mxGxiHU0uUd4zTtOFWvn3XV2Kzsh09AKAAGfdBhSdeXaF64u3PF0sa7gcwk6HoGTM3Rqa8KpEsrMvbQtVA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=microsoft.com; dmarc=pass action=none
 header.from=microsoft.com; dkim=pass header.d=microsoft.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
 s=selector2;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=vfNzwhwD9Te4Ktrjs/M9mDye21CFl3Fk0pqrkpP4jgc=;
 b=GseaRDhdjICNEME2CBry3xDB4F+Ev0jgvpBYaCxZcxnxMRRlGlA+2ZUTjtBIuGHhFDMPjzZEeFMSBBHhA8MZk/GV/7C6pD1Gh4P1D+3YiO6gYAnhfgJYSj9Ej7QKK47INXjfimH+BxushUHWYQb/WDLBXEQ7hBIYVsrieZJPNLA=
Received: from (2603:10b6:5:1bc::23) by
 DM5PR00MB0296.namprd00.prod.outlook.com (2603:10b6:4:9e::37) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.3829.0; Tue, 26 Jan 2021 03:31:37 +0000
Received: from DM6PR00MB0845.namprd00.prod.outlook.com
 ([fe80::6450:8a43:1d66:8d3d]) by DM6PR00MB0845.namprd00.prod.outlook.com
 ([fe80::6450:8a43:1d66:8d3d%5]) with mapi id 15.20.3839.000; Tue, 26 Jan 2021
 03:31:37 +0000
From: Darrel Miller <Darrel.Miller@microsoft.com>
To: "christoph.kappestein@gmail.com" <christoph.kappestein@gmail.com>,
 "httpapi@ietf.org" <httpapi@ietf.org>
Thread-Topic: [httpapi] Discussion about JSON payloads and code generation
Thread-Index: AQHW7AmIPyJ32zvjfE6Ci8mHOwNnYKoqynhfgADqNICAAI74B4AA6lgAgAllZACAArdRjA==
Date: Tue, 26 Jan 2021 03:31:37 +0000
Message-ID: <DM6PR00MB0845395CA1758BB99D2D4863F0BC9@DM6PR00MB0845.namprd00.prod.outlook.com>
References: <CALcRZn6-ojAAdJcMWFHef70Xp32O2iFatuw-YjGLKtr8VnbmYQ@mail.gmail.com>
 <DM6PR00MB0845824BE38945071F9774A5F0A69@DM6PR00MB0845.namprd00.prod.outlook.com>
 <CALcRZn6HdXE2WAn0vSod0XDY_yJd7jV7m5JnRWKWGDJaDaag-A@mail.gmail.com>
 <BL0PR00MB083637DAD075EC8E5342A0A9F0A59@BL0PR00MB0836.namprd00.prod.outlook.com>
 <CAEdRHi4q4d4RF1x8YJcJiWrMSij9FjK9pWjj7DMygqX38dZC1w@mail.gmail.com>,
 <CALcRZn5QMQK3xzKHSYJAsbzvHN3SJ2xNJGZ2R1i60Tc543+xxQ@mail.gmail.com>
In-Reply-To: <CALcRZn5QMQK3xzKHSYJAsbzvHN3SJ2xNJGZ2R1i60Tc543+xxQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True;
 MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47;
 MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2021-01-26T03:31:36.881Z;
 MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General;
 MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ContentBits=0;
 MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Method=Standard; 
authentication-results: gmail.com; dkim=none (message not signed)
 header.d=none;gmail.com; dmarc=none action=none header.from=microsoft.com;
x-originating-ip: [74.15.147.35]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 27612f02-4696-414a-9e78-08d8c1aae329
x-ms-traffictypediagnostic: DM5PR00MB0296:
x-microsoft-antispam-prvs: <DM5PR00MB0296B5649964FC38E4787B47F0BC9@DM5PR00MB0296.namprd00.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: yofOKk2xXXwNYUMnS6qlnEyDBDbCtnhtCB9lr356qsLERiwndP+yON5L313p2nvfjeS2xpNajl9cyqGIJJaTkJ1jHnNDsUNPhrS8ptd5d57f7H14XtU+sco7W6hKbgTOFfArGG6GGLFhk2lHtUBwpaUS9VycbV4UEhNr7m1rwTrbZ9sIuphoZzh+kyGTHSG8mAXmmxtn+dEiYMtVrod6FgeWYXX/Tb1oD6Y3R8YF0Cyp53YehXqO0mPhMGWtOWAxk+MP1dsld/YynVCQewkKI6rBrx/B0JQA4PxgMEsER0aU2WkJtTT38poj5/EN0307Tx1r9S47m7gE0+hJCln5laT8N5v+iRIm7v7SJxPS6k4/TDfHHCEo0ONJMqQjYFaDASX3n+dvN0riPRmi5tprDvStUup4nOQwW8QJVurACfYJ9UsIM0bxY/EMXaN+Nk/4AR6sToIno1s/uFPDQr1z4M3/ksHpcsIqI/ZKhWKhJeSD/D2hGkiywRhXhCKQr5lznVC3cvFQcT3e9pAxg8yC84bXoEKGpX/UojYimK1ZfTmjtvagoYNfQ9v7b2Ws3QWQxdrVu8VGXWVMITxk7Neyet8o3KhT0nEhhzI1l2c/V6Y=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; 
 IPV:NLI; SFV:NSPM;
 H:DM6PR00MB0845.namprd00.prod.outlook.com; PTR:; CAT:NONE; 
 SFS:(4636009)(396003)(39860400002)(366004)(136003)(376002)(346002)(7696005)(316002)(110136005)(2906002)(478600001)(86362001)(966005)(76116006)(10290500003)(52536014)(66476007)(66556008)(64756008)(66446008)(66946007)(55016002)(6506007)(19627405001)(71200400001)(186003)(26005)(33656002)(8936002)(9686003)(8676002)(8990500004)(82960400001)(82950400001)(5660300002);
 DIR:OUT; SFP:1102; 
x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?4FpVaJuCBaB0I4g/ujw8UK4ipQPXZKqT0XJGR0h189XAnOWBjdjlZFfWXO?=
 =?iso-8859-1?Q?q0y2Rd5e5TTStxWwn5tpezXQuVNsO25eEQjZcBMAqo0+ZtYcfi9Ye3r0a8?=
 =?iso-8859-1?Q?ftg/sLLPeg6wsPxAD3EgV01I4ADXLWyVFC+Gfonws5qr4rEPulyshznn7q?=
 =?iso-8859-1?Q?LBrojZ8zv3VllLIhbh8pjfpnjqNnSUKGF8d6yvUlOST4cZAwzB3wSEHdtL?=
 =?iso-8859-1?Q?hwJAXmDVwcMUjwvTiNwHtdQYrffUYfdFWFRyDCK9EP+PJWjx1tjfD6Nu3Z?=
 =?iso-8859-1?Q?FAR1YozqPAyzXJFKS8dUUQZOdzuEEz2bti4EpNa69h5fmU6vkz4RXVowRc?=
 =?iso-8859-1?Q?medNGNmeis1Avn9aNbkV5nakemxByuiV+8ZyYWaurGglagbl2XZAhSNi4o?=
 =?iso-8859-1?Q?HHVc1fvxXD41up3K5oi7K+g5eRi35p48g8U9k6vk3u2vCYipo1x25wUbNc?=
 =?iso-8859-1?Q?cS8BXsdKnbGE476hqSUooSTf9JLi28mAEqpdT75/u6CHKCGy/btl3Nh8Qv?=
 =?iso-8859-1?Q?2qIRCQ3mgcmEkc+qX1RlKdACkKlqpNfpsSHQHstVHBqxn4aoOPB5/zGvvx?=
 =?iso-8859-1?Q?CurpTFE3dAFlq3O1MHVJvEnPA5COmeAIFD4zVAe9Q46qmLTMziMt85aqAe?=
 =?iso-8859-1?Q?r7cR32zhkrGYLvJSFbWANmNwnKAmbuRDNw16NR7OvaUzmjffaMSZAbn3C+?=
 =?iso-8859-1?Q?aJc0fYhRLConRtRrJL7ENFhih64OzGNSdx9XwhRNEjwLhvYyLlga9Bq0Lo?=
 =?iso-8859-1?Q?N1gF4zfw+uaOX/RqE3ZoSGq3FIXfNQcIMu+Y+kNSCdelgb1I63F60fNxLL?=
 =?iso-8859-1?Q?zZCPNrKI2VNrHyUeliP8AjfmbmRRH66TLaVoZtLLtHOWZ/MAQC61TUiisd?=
 =?iso-8859-1?Q?TPkD8qkKP5rGD4eaNDCjYFu1bHwq7K7wHKcn/STsRWtKIBQHXwWDbaHTS0?=
 =?iso-8859-1?Q?QPZB3tJHzVQxt/SV8JdFzUlxeeF/rodSVtnG0lM7j2x7Yg6mZu+guRch17?=
 =?iso-8859-1?Q?rd77FuRVonEBhYVvCwaRf3BuZM/DDPan3FX9STcrAOt0TtYs2ABzdVWjIR?=
 =?iso-8859-1?Q?1RZ1hNntiyMMMcTf10YB07jMXG+5rU18aV6b4JJWVByf?=
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative;
 boundary="_000_DM6PR00MB0845395CA1758BB99D2D4863F0BC9DM6PR00MB0845namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM6PR00MB0845.namprd00.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 27612f02-4696-414a-9e78-08d8c1aae329
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jan 2021 03:31:37.2154 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: /i6yTGLhITmAX0Zep0vrScg3KeNrbt2aN3Mj4tNm+9RWiKbZTgcqMC+XhQhGK/B4F18j54eOfbmVtXW1GnP6Tg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR00MB0296
Archived-At: <https://mailarchive.ietf.org/arch/msg/httpapi/1pEQ0uGWpi5KaYUDkyWax4i8mII>
Subject: Re: [httpapi] Discussion about JSON payloads and code generation
X-BeenThere: httpapi@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Building Blocks for HTTP APIs <httpapi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/httpapi>,
 <mailto:httpapi-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/httpapi/>
List-Post: <mailto:httpapi@ietf.org>
List-Help: <mailto:httpapi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/httpapi>,
 <mailto:httpapi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Jan 2021 03:32:01 -0000

--_000_DM6PR00MB0845395CA1758BB99D2D4863F0BC9DM6PR00MB0845namp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Christoph,

From: Christoph Kappestein <christoph.kappestein@gmail.com>
I am wondering whether it would be also possible to describe complex types
in such a specification, i.e. that we describe how a list, map or object/st=
ruct
type could look and is defined through keywords. So I would totally support=
 this
effort, since this is basically the reason why we have developed TypeSchema=
 and
we would be happy to build upon such a specification.

best regards
Christoph

If we added the constraint that complex types must be described using JSON =
primitives, then I could imagine enabling a registry of "well known" types,=
 including complex types and their corresponding JSON serializations.

One thing that appeals to me about a registry of well known types, is that =
no particular serialization needs to win.  People can just pick the one the=
y want to use.

Going back through the short history of this working group, we have the Lin=
kset draft https://datatracker.ietf.org/doc/html/draft-wilde-linkset-07#sec=
tion-4.2.3 that serializes a link as a map entry and Evert Pot's https://to=
ols.ietf.org/html/draft-pot-json-link-02#section-2 serialization as an obje=
ct.  I've seen scenarios where both formats make sense.  There is no reason=
 that "link-relation-map-entry" and "link-relation-object" could not both b=
e registered.

Darrel

--_000_DM6PR00MB0845395CA1758BB99D2D4863F0BC9DM6PR00MB0845namp_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 10pt; color: rgb(0, 0, 0);">
Hi Christoph,</div>
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<blockquote itemscope=3D"" itemtype=3D"https://schemas.microsoft.com/Quoted=
Text" style=3D"border-left: 3px solid rgb(200, 200, 200); border-top-color:=
 rgb(200, 200, 200); border-right-color: rgb(200, 200, 200); border-bottom-=
color: rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rg=
b(102, 102, 102);">
<div id=3D"divRplyFwdMsg" dir=3D"ltr"><font face=3D"Calibri, sans-serif" co=
lor=3D"#000000" style=3D"font-size:11pt"><b>From:</b> Christoph Kappestein =
&lt;christoph.kappestein@gmail.com&gt;</font></div>
<div id=3D"divRplyFwdMsg" dir=3D"ltr">I am wondering whether it would be al=
so possible to describe complex types<font face=3D"Calibri, sans-serif" col=
or=3D"#000000" style=3D"font-size:11pt"><br>
</font></div>
<div>
<div dir=3D"ltr">in such a specification, i.e. that we describe how a list,=
 map or object/struct<br>
type could look and is defined through keywords. So I would totally support=
 this<br>
effort, since this is basically the reason why we have developed TypeSchema=
 and<br>
we would be happy to build upon such a specification.<br>
<br>
best regards<br>
Christoph<br>
<div><br>
</div>
</div>
</div>
</blockquote>
<div>
<div class=3D"x_gmail_quote">
<div>If we added the constraint that complex types must be described using =
JSON primitives, then I could imagine enabling a registry of &quot;well kno=
wn&quot; types, including complex types and their corresponding JSON serial=
izations.</div>
<div><br>
</div>
<div>One thing that appeals to me about a registry of well known types, is =
that no particular serialization needs to win.&nbsp; People can just pick t=
he one they want to use.</div>
<div><br>
</div>
<div>Going back through the short history of this working group, we have th=
e Linkset draft
<a href=3D"https://datatracker.ietf.org/doc/html/draft-wilde-linkset-07#sec=
tion-4.2.3">
https://datatracker.ietf.org/doc/html/draft-wilde-linkset-07#section-4.2.3<=
/a>&nbsp;that serializes a link as a map entry and Evert Pot's
<a href=3D"https://tools.ietf.org/html/draft-pot-json-link-02#section-2">ht=
tps://tools.ietf.org/html/draft-pot-json-link-02#section-2</a>&nbsp;seriali=
zation as an object.&nbsp; I've seen scenarios where both formats make sens=
e.&nbsp;&nbsp;There is no reason that &quot;link-relation-map-entry&quot;
 and &quot;link-relation-object&quot; could not both be registered.&nbsp;<b=
r>
</div>
<div><br>
</div>
<div>Darrel</div>
</div>
</div>
</body>
</html>

--_000_DM6PR00MB0845395CA1758BB99D2D4863F0BC9DM6PR00MB0845namp_--

