Re: [Json] Schemas & so on

Peter Cordell <petejson@codalogic.com> Mon, 02 May 2016 10:51 UTC

Return-Path: <petejson@codalogic.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 726E112D1D1 for <json@ietfa.amsl.com>; Mon, 2 May 2016 03:51:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.92
X-Spam-Level:
X-Spam-Status: No, score=-0.92 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=no 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 SiKop2sytjnj for <json@ietfa.amsl.com>; Mon, 2 May 2016 03:51:21 -0700 (PDT)
Received: from ppsa-online.com (lvps217-199-162-192.vps.webfusion.co.uk [217.199.162.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 79D4912B056 for <json@ietf.org>; Mon, 2 May 2016 03:51:21 -0700 (PDT)
Received: (qmail 15891 invoked from network); 2 May 2016 11:46:42 +0100
Received: from host31-54-178-133.range31-54.btcentralplus.com (HELO ?192.168.1.72?) (31.54.178.133) by lvps217-199-162-217.vps.webfusion.co.uk with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 2 May 2016 11:46:42 +0100
To: Tim Bray <tbray@textuality.com>, "json@ietf.org" <json@ietf.org>
References: <CAHBU6itCV9MXmALdKtE9-vjUPG6-6ZqdqzrmZkcEzSUysi3S-w@mail.gmail.com>
From: Peter Cordell <petejson@codalogic.com>
Message-ID: <802c1540-c5b8-e487-05bb-5c54b03bd0e5@codalogic.com>
Date: Mon, 2 May 2016 11:51:16 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0
MIME-Version: 1.0
In-Reply-To: <CAHBU6itCV9MXmALdKtE9-vjUPG6-6ZqdqzrmZkcEzSUysi3S-w@mail.gmail.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 8bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/JfpO6pjXwOIlRzQFquB87mgzX04>
Subject: Re: [Json] Schemas & so on
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.17
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: Mon, 02 May 2016 10:51:24 -0000

On 01/05/2016 21:55, Tim Bray wrote:
>
> I find myself tasked with specifying a JSON-based DSL and preparing it
> for public release, with a validator and so on.
>
> I had never really concerned myself much with options for JSON language
> definition, but have discovered they’re not very good.  The JSON Schema
> project is not terribly appealing - opaque spec, poor documentation and
> tools - and smells of neglect (last I-D expired in 2013).  It's been
> suggested that a good approach would be just to write a jq program that
> emits true or false.
>
> Is there good conventional wisdom about formally specifying a JSON dialect?

Andy Newton and I are working on JSON Content Rules (JCR) [1] which is a 
basic JSON grammar schema language that mirrors the functionality of 
Relax NG and XSD.  We also have put together some thoughts on JSON 
Content Rules Co-Constraints (JCRCC) [2] which adds Schematron like 
functionality to JCR.  There's some links to pilot implementations at [3].

Our goal has been to make it as simple as we can without losing 
expressiveness with a view to not requiring users to be experts in the 
technology before they can make use of it.  We're also hoping that a 
simple solution will also readily enable multiple implementations.

We'd obviously be delighted to hear from anybody who's interested in the 
work.

Thanks,

Pete.

[1] https://datatracker.ietf.org/doc/draft-newton-json-content-rules/
[2] https://datatracker.ietf.org/doc/draft-cordell-jcr-co-constraints/
[3] http://codalogic.github.io/jcr/
-- 
---------------------------------------------------------------------
Pete Cordell
Codalogic Ltd
Read & write XML in C++, http://www.xml2cpp.com
---------------------------------------------------------------------