Re: [Json] JSON Schema Language

Ulysse Carion <ulysse@segment.com> Fri, 10 May 2019 03:55 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 40E0012006F for <json@ietfa.amsl.com>; Thu, 9 May 2019 20:55:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 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_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 r5tPsWi8JaUe for <json@ietfa.amsl.com>; Thu, 9 May 2019 20:55:33 -0700 (PDT)
Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (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 226BF12004D for <json@ietf.org>; Thu, 9 May 2019 20:55:33 -0700 (PDT)
Received: by mail-io1-xd34.google.com with SMTP id z4so3450437iol.0 for <json@ietf.org>; Thu, 09 May 2019 20:55:33 -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=YWeoNUBJzBP4YyPXgFic3eZrZJBMwNo2iIy9n9OoVbw=; b=MAbPABc3d4eJyOS2YrmquIE6Zlwk8VbkjmQNVLQhhQcv2jASt+7cTBZAm9+/ROJ7zC qwHHT5EIpQk0C6uxJ5whIOIiozT0X405Y/HcEOahPM233r99LtXei3l7RptXUpl3XqIP mPqkDXSF/KM6MHMDnQTZCo36SHQq/7Rcbpfhg=
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=YWeoNUBJzBP4YyPXgFic3eZrZJBMwNo2iIy9n9OoVbw=; b=gqWs1/DzMnJvkqCRmK2ZUkglLCkMidPXUq3/K+Dp6nl8pzXgxUf1aAUgEFugDeBXVH 4XmwiJaOZ4/NFWLWZHhppS5pbB2pkHBhBOlQ01w/Gy1bcfDTqiY60Pdo2WUHYNhLzZGe irl9JlC2X20eAa1G3W6cbahBYRluKsYYVJ1g3Vva1sztrNylU5CplliVBOQhP/7zkNM6 +RTieWsA7PVSCsl1eMoYHaT2IcLg6qj1iG/PScn1Q7TqiSA6ALd5T9LRcIrEPso6CYB7 +g3U80Vze4DMThsmwA77Jg8lrh81/hLlXfLex6dk6lWHmezeXc0UJNJInOozhJmzxV85 1Lww==
X-Gm-Message-State: APjAAAUFf4vdKsAbkRPk3RXJr8K7T/j8QImdQfWG0BaWn9BeeWg0wnnt FgJfJeWcR7OC8Nz4VFVe9+lpDNQrj5DF4qpE+y8wkMkia8c=
X-Google-Smtp-Source: APXvYqzzyxvYBFJegXXMbSQOshXQ/RASd841EJePLvxQ8bfYF6WiFXSiVHqUo3nu6F0mldLL3/jp14J/KE+0C2C1z5Y=
X-Received: by 2002:a5d:9b90:: with SMTP id r16mr5275232iom.217.1557460532323; Thu, 09 May 2019 20:55:32 -0700 (PDT)
MIME-Version: 1.0
References: <CAJK=1RjV1uv0eOdtFZ8cKn-FfCwCiGP5r2hOz1UamiM6YV4H1A@mail.gmail.com> <CAHBU6itE8kub1qtdRoW8BqxaOmzMv=vUo1aDeuAr3HX141NUGg@mail.gmail.com> <77994bdb-a400-be90-5893-b846a8e13899@gmail.com> <20190507154201.GP21049@localhost> <CEF72901-5077-4305-BA68-60624DCE952D@bzfx.net> <69ea0c99-e983-5972-c0aa-824ddeecb7c4@dret.net> <CAMm+LwjyVjnJuWE4+a9Ea=_X1uuEGuK+O4KojzN3uVQ+s+HqUQ@mail.gmail.com> <058f58a3-dd27-998e-5f54-4874aff5f2f0@dret.net> <20190507221726.GR21049@localhost> <CAJK=1Rj7PBD-bbwvsqgjQQzp4Aoidb-W2q5Lj6asMHHDHaTVYQ@mail.gmail.com> <646abf11-496b-c120-45d6-2a1aeab051a8@codalogic.com> <8224451C-F21B-41E5-A834-A9005050CB1F@tzi.org>
In-Reply-To: <8224451C-F21B-41E5-A834-A9005050CB1F@tzi.org>
From: Ulysse Carion <ulysse@segment.com>
Date: Thu, 09 May 2019 20:55:21 -0700
Message-ID: <CAJK=1RjdYD6TZCNrw=H3d9ZLKLxZZOwVCOYYPwfbP+1ETDDz1Q@mail.gmail.com>
To: Carsten Bormann <cabo@tzi.org>
Cc: 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/Rh43rqZ3u3Hi6BUP7aw7WfJcOl4>
Subject: Re: [Json] JSON Schema Language
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: Fri, 10 May 2019 03:55:35 -0000

Carsten,

Do you think that our difference in opinion on CDDL vs JSON Schema
Language may be attributable to a difference in requirements?

It seems to me that your use-case is centered around defining
standards and other complex data requirements. CDDL is, in my view,
unquestionably a better choice for this use-case. In my mind, CDDL is
ABNF for CBOR, and that is undeniably what standards dealing with CBOR
or its near-equivalents require. The existing references, from RFCs,
to CDDL are testament to this.

But I (and I suspect Tim) am more preoccupied solely with defining the
mundane sorts of messages that come out of JSON event processing and
repetitive JSON APIs. Tim has blogged (see link in my original email)
about dealing with AWS's CloudWatch events. That's messages that look
like this:

https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/EventTypes.html

Tons of messages, and frequently being added and updated. But none of
these messages are particularly exciting from a schema perspective.

CDDL can do much more than is necessary for merely representing
CloudWatch events. This may seem like a good thing, but such excess
capability reduces the suitability of the solution. JSON Schema
Language is intentionally small and scuttled in scope, so as to
simplify code and UI generation. By being so limited in scope, JSON
Schema Language fits more easily into the architecture of a system
that would like to integrate it.

Do you think this may be an explanation for our disagreement? If not,
I may need to re-read the discussion, because I must have
misunderstood you.

On Wed, May 8, 2019 at 8:46 AM Carsten Bormann <cabo@tzi.org> wrote:
>
> On May 8, 2019, at 15:48, Pete Cordell <petejson@codalogic.com> wrote:
> >
> > Writing XML Schema becomes more bearable if you have XML Schema aware editors.  Being XML aware alone isn't sufficient.
>
> Writing is not the main activity.  Reading is.  That is nearly unbearable without tools.
>
> If I have to work on a W3C Schema(*), I convert it to Relax-NG compact first.  True, I’ll lose some information, but as a net result I'll digest much more information out of the W3C Schema document than if I had directly looked at that.
>
> At the time when I was closer to the XML community, the hallway consensus was that W3C Schema was *designed* to sell more tools.
>
> (Hence my short note yesterday giving the CDDL translations for JSL; that would probably be the way I would be reading — or writing — JSL.)
>
> Grüße, Carsten
>
> (*) The data description spec that W3C called XML Schema
>