[Json] Notes on json-schema-language-00

Tim Bray <tbray@textuality.com> Tue, 07 May 2019 04:40 UTC

Return-Path: <tbray@textuality.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 A0C1912002F for <json@ietfa.amsl.com>; Mon, 6 May 2019 21:40:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=textuality-com.20150623.gappssmtp.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 PExKZQTJkSKe for <json@ietfa.amsl.com>; Mon, 6 May 2019 21:40:21 -0700 (PDT)
Received: from mail-it1-x131.google.com (mail-it1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 99736120020 for <json@ietf.org>; Mon, 6 May 2019 21:40:21 -0700 (PDT)
Received: by mail-it1-x131.google.com with SMTP id q65so22791426itg.2 for <json@ietf.org>; Mon, 06 May 2019 21:40:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=textuality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=CxnHHdFPKYw7oy/JeSo6A69fiqjuhB03mNzbogjOEW0=; b=2JhzSU/FNpRog/rT7dv34wu+sFM7bRWqbHoOtyF6Vs6FNyiKbeoDIgcWCBt2l4C5E9 XhIB5df4774DVV7H4hFSZnkUUXspwKOW1NY9oI2m2FQgVV0OHl8zKupVSFO4sY38K/NO 4kK3hS087oOFRU0byPxY5tQaC+UlryyaSO2d/3oH/+58HDJDx4zsWF1Akdz/RJcfQAmS 2yzeusxQHlNlUuMnck0OvG9aSXFeFIiodsDy/O5dewHC2+bLnYRX+AeWiUMiQF0MFq0R hMxg30XWP6pq4GSUnyefIvxh+sW3FVO0d4SwgC8eoUTuxQUB0RLcm9FYFdii3ZI6lVZX +Fxw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=CxnHHdFPKYw7oy/JeSo6A69fiqjuhB03mNzbogjOEW0=; b=ShbdUsoLleX6emaJ1sFFM58d/8+RarS7W7NpMCG/Ig8VXvsB1iF+2EbY4KKSNHFWDe /7ZCFtXdkOM9zb9uNwBd83Iwwyj4+UCfZ8G27qftrTBnK+hWNNl38ryPcTKEgmcBxpg0 OtReTYbMRMpgpvyPQfMdY/Hg4QpAXq4yvUpB0imikXJyRoUPKqrV4laUVbgo9XG6rAyl OZCI6Oi6OCOmR0G3ryBViGyxZZd+xVu3sMbM+BsyLKCcwa37spYe7uQLj/KG9rqJWl3g MkgJo4ihsT5uqMH/01chWiiKjP073xYnc2wQl0GlmGIy67Se2WsqvHjbAKPtU0I6JiOU xZbA==
X-Gm-Message-State: APjAAAW8tWBbbvxsa2Lv+6NRmmJr+Ss5DvrP0GmcztAFQxbSR9thzu74 GmQjVs9ayUzM3clZ8Mbu0/kcPtUuESfvqKauONUcgQ==
X-Google-Smtp-Source: APXvYqzDUzpF9+NqltUpcOPhooDFs7tNgzGu3XlNnKrA3Cy90J/bJ8AI2/wlZkkwJul/nW2nin1I3Cs0IRRHMbW4aX0=
X-Received: by 2002:a24:6b4b:: with SMTP id v72mr20730293itc.174.1557204020757; Mon, 06 May 2019 21:40:20 -0700 (PDT)
MIME-Version: 1.0
From: Tim Bray <tbray@textuality.com>
Date: Mon, 06 May 2019 21:40:09 -0700
Message-ID: <CAHBU6isW42dU2w12LXc=iNk0djZj5M_3KYjcLsNvTS9C8CF_3g@mail.gmail.com>
To: Ulysse Carion <ulysse@segment.com>, json@ietf.org
Content-Type: multipart/alternative; boundary="00000000000080168b058844d0d7"
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/4UoifbGmwtfsWddgrfy903Q2pD8>
Subject: [Json] Notes on json-schema-language-00
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, 07 May 2019 04:40:24 -0000

I've now had time to give the draft a read.  I think it shows promise and
would be useful in meeting needs I'm currently facing at work.  I'd like to
talk it over and if we can move it forward a bit and get significant
community support for a revised draft, would be interested in proposing we
spin up a WG to see if there's IETF consensus to be had, and in
volunteering to invest cycles to help with the process.  If anyone objects
to using this mailing list for such a conversation, please say so.
Obviously since it's on github we could file issues there if that's what
people would prefer.

Ulysse, if we do have such a discussion, please don't charge off and start
revising your draft; it's helpful to keep the document stable for a while
while we figure out whether there's consensus.

First, a question: I'm a little out of touch with the json-schema work.  Is
this designed to be a compatible subset?  Or is there any other
relationship?  Depending on the answer, we might want to consider a name
for this other than "JSON Schema Language".

Some things to discuss:

   1. There are problems with JSON terminology; "JSON text", "field",
   "name"/"value", "corresponding". But these are easy to fix.
   2. I'd consider enriching the type range a bit, we don't have to stick
   strictly with JSON's impoverished diet
   1. In 4.1, I think it'd be useful to specify integer/float, bearing in
      mind the reasonableness in behavior discussed in the intro thread.
      2. I'd add a timestamp type (RFC3339 strings)
      3. I'd really want to add an enum type (constraint on JSON string
      value)
   3. I'd introduce lots of examples early in section 4, to show how each
   of the keywords might be used.
   4. In 4.4, I suggest the URI reference resolution procedure is way too
   complicated, and needn't involve the "id" element at all.
   5. Probably error objects should allow extra fields such as line/column
   numbers and human-readable explanations of what went wrong.