Re: [Json] A schema language for JSON

Carsten Bormann <cabo@tzi.org> Tue, 02 April 2019 11:53 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 A605B120513 for <json@ietfa.amsl.com>; Tue, 2 Apr 2019 04:53:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, URIBL_BLOCKED=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 VN3ZLHfbKwKD for <json@ietfa.amsl.com>; Tue, 2 Apr 2019 04:53:39 -0700 (PDT)
Received: from smtp.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 46EC2120514 for <json@ietf.org>; Tue, 2 Apr 2019 04:53:39 -0700 (PDT)
Received: from sev.informatik.uni-bremen.de (sev.informatik.uni-bremen.de [134.102.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.uni-bremen.de (Postfix) with ESMTPSA id 44YSKD4l06z10PP; Tue, 2 Apr 2019 13:53:36 +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: <CAJK=1RiSRdJ+O+L8MWU=dHE-JxW-Xe_aJm1UQJLTEg=orgXv5A@mail.gmail.com>
Date: Tue, 02 Apr 2019 13:53:36 +0200
Cc: json@ietf.org
X-Mao-Original-Outgoing-Id: 575898814.909138-1773460a25f8888ebcb25a0e321d1a7d
Content-Transfer-Encoding: quoted-printable
Message-Id: <B51E9EA0-13D0-4242-974A-A2029CD071BC@tzi.org>
References: <CAJK=1RiSRdJ+O+L8MWU=dHE-JxW-Xe_aJm1UQJLTEg=orgXv5A@mail.gmail.com>
To: Ulysse Carion <ulysse@segment.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/qtlpRkwrnmsm2QgYCuE9qnTkkIg>
Subject: Re: [Json] A schema language for JSON
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, 02 Apr 2019 11:53:51 -0000

On Apr 2, 2019, at 05:06, Ulysse Carion <ulysse@segment.com> wrote:
> 
> Would folks in this list be interested in working on a schema language for JSON?

That depends a lot on what a “schema language for JSON” is for you.

Generally, this WG has been hesitant to adopt any specimen out of this loosely defined species, but has also been open to letting some flowers bloom.  Pete mentioned JCR, which is one of the more expressive proposals.

Over at the CBOR WG, we now have a specification approved for the “Concise Data Definition Language”, CDDL, which can describe CBOR data items, and, since the JSON data model is a subset of that of CBOR, JSON data items as well.  This has been used to define a number of JSON protocols, e.g., RFC 8007 and RFC 8428 (*).  It is not using JSON as its presentation language, but is more concise (**).  Since I don’t know your requirements, I’m not sure whether CDDL would be useful for you.  Please see https://tools.ietf.org/html/draft-ietf-cbor-cddl — currently in the RFC editor queue.

Grüße, Carsten

(*) Full list:
https://datatracker.ietf.org/doc/draft-ietf-cbor-cddl/referencedby/
https://datatracker.ietf.org/doc/draft-greevenbosch-appsawg-cbor-cddl/referencedby/
(**) An old comparison between what was then a version of “JSON Schema” (Gallege/Zyp/Court branch) and CDDL:
https://www.iab.org/wp-content/IAB-uploads/2016/03/Noise-in-specifications-hurts.pdf