Re: [Json] JSON Schema Language

Pete Cordell <petejson@codalogic.com> Wed, 08 May 2019 13:48 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 99EC312010D for <json@ietfa.amsl.com>; Wed, 8 May 2019 06:48:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, 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 dpAGJANbdaBb for <json@ietfa.amsl.com>; Wed, 8 May 2019 06:48:15 -0700 (PDT)
Received: from ppsa-online.com (ppsa-online.com [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 A9B4D120089 for <json@ietf.org>; Wed, 8 May 2019 06:48:14 -0700 (PDT)
Received: (qmail 736 invoked from network); 8 May 2019 14:46:22 +0100
Received: from host109-157-169-192.range109-157.btcentralplus.com (HELO ?192.168.1.72?) (109.157.169.192) by lvps217-199-162-217.vps.webfusion.co.uk with ESMTPSA (AES128-SHA encrypted, authenticated); 8 May 2019 14:46:20 +0100
To: Ulysse Carion <ulysse@segment.com>
Cc: JSON WG <json@ietf.org>
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>
From: Pete Cordell <petejson@codalogic.com>
Message-ID: <646abf11-496b-c120-45d6-2a1aeab051a8@codalogic.com>
Date: Wed, 08 May 2019 14:48:08 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <CAJK=1Rj7PBD-bbwvsqgjQQzp4Aoidb-W2q5Lj6asMHHDHaTVYQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-GB
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/json/SoleQWrEFo48p3_E7mk13UdFZ2A>
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: Wed, 08 May 2019 13:48:18 -0000

On 08/05/2019 00:57, Ulysse Carion wrote:
> ...  I went with JSON as the representation
> because it makes building tooling atop of JSON Schema Language much
> easier, since it doesn't require that the implementor write a parser.
> Such ease of extension is valuable: JSON is widespread largely because
> of how easy it is to build atop of, and we should not readily
> sacrifice this. JSON as the representation also unlocks syntax
> highlighting, formatting, and other such niceties for free.
> Furthermore, and most importantly, using JSON as a representation does
> not preclude later creating a RELAX NG-style compact representation
> later on.

This makes sense if the only things reading and writing JSON Schema are 
machines. Once you have humans involved, my experience (e.g. XML Schema) 
is that it is a bad choice.

Writing XML Schema becomes more bearable if you have XML Schema aware 
editors.  Being XML aware alone isn't sufficient.

So in addition to having a JSON aware editor, you would also need a JSON 
Schema aware editor that included auto-suggestion and more advanced 
editing features beyond syntax highlighting etc like that.

IMO, in that case you would be better off putting effort into a JSON 
specification format that didn't need as much help to edit it in the 
first place.

Pete.
-- 
---------------------------------------------------------------------
Pete Cordell
Codalogic Ltd
C++ tools for C++ programmers, http://codalogic.com
Read & write XML in C++, http://www.xml2cpp.com
---------------------------------------------------------------------