Re: [Json] Schemas & so on

Tim Bray <tbray@textuality.com> Mon, 02 May 2016 01:13 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 C51F912B02F for <json@ietfa.amsl.com>; Sun, 1 May 2016 18:13:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 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_LOW=-0.7] 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 99e2bIS_EJQ8 for <json@ietfa.amsl.com>; Sun, 1 May 2016 18:13:33 -0700 (PDT)
Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d:c09::230]) (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 B12B512B015 for <json@ietf.org>; Sun, 1 May 2016 18:13:33 -0700 (PDT)
Received: by mail-qk0-x230.google.com with SMTP id x7so68048920qkd.3 for <json@ietf.org>; Sun, 01 May 2016 18:13:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=textuality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hwwF8LZvl5OkkxGLcojGS5+j1p5ChIk7ETWZLRqmMnc=; b=k6TJifuYjnyC+faFnZDxbT1M9ooNJW1tzRrzyhuv2heOe1Yxl01ukAsoow4HrdvNLK nc6FNjcsMrAnUEJypOpkljPTQLI20hVbqfD8XmzoTZvrjQgVjcg7MxDyIOI6nwxW2BHI OFrtDIBQFCyzw8HytvtofFD/u1O1kSmX10Zo/qDN1ZGH4QWOMa4skybxmUMNiZ/jZM/o pV9C3jetk2DG9lgk4skjkwPPXAujN4zXkpZxtclG1XFwn7ywcccR0wXkw8fkmJPvnKeM rKIfot2VXMh23USnEErZZ5Dxh6nnNnytGGn2urim6Bhz4e3vmN/4/Kkl7XnTNprSOnkk Vd8w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hwwF8LZvl5OkkxGLcojGS5+j1p5ChIk7ETWZLRqmMnc=; b=HBNrH0PnWfPZtcGETLkA+4AGmdhfMIu/JPQLuNddOIfvv7IjMJdq4RgqXQdV44Ux1X 6KuAJgx7y+jkw4pIyPRRndUYtEvCFzDBcpc4446ChOphFTasxva4EIkbZbdp7YXLcD3X mtbjO6a+t9Ij+cjswWNyFTb/yR5sbjv4bzrvut5qs+gYfy+SR9VnHfl6rHbp/9eelWqp U+abYLVgcI88LBOPeyamL0eZTjilvlORFXA3TsQAA051WGm/bqcn+e2f1qno5kV+IK+J jGb+QMmLxCeaJi2Fz2+7hvs4OZDNizvEt4kbjn2dMZBDyIlUwjwWfZIlM5UMAg5DEPnY RS7A==
X-Gm-Message-State: AOPr4FWOvt2LpHIbxiQiRswdhfLsD30uG276eqL51CUDzb9O78sSfHwJC1r6Dfmrs/0kAhsKpLfxDOYCrrHlkQ==
X-Received: by 10.55.174.68 with SMTP id x65mr31338180qke.184.1462151612823; Sun, 01 May 2016 18:13:32 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.94.201 with HTTP; Sun, 1 May 2016 18:13:13 -0700 (PDT)
X-Originating-IP: [24.84.248.61]
In-Reply-To: <7a6edf91-30d1-383b-4548-e12b988f9467@it.aoyama.ac.jp>
References: <CAHBU6itCV9MXmALdKtE9-vjUPG6-6ZqdqzrmZkcEzSUysi3S-w@mail.gmail.com> <7a6edf91-30d1-383b-4548-e12b988f9467@it.aoyama.ac.jp>
From: Tim Bray <tbray@textuality.com>
Date: Sun, 1 May 2016 18:13:13 -0700
Message-ID: <CAHBU6iuet7A=+z4AB6mvgqZhUfiB+JjRm2HDO46uYMynXz5KXA@mail.gmail.com>
To: =?UTF-8?Q?Martin_J=2E_D=C3=BCrst?= <duerst@it.aoyama.ac.jp>
Content-Type: multipart/alternative; boundary=94eb2c060f0c7dae520531d1b31d
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/ilDA7mcVCFrvyVIPzdqkhciT5jw>
Cc: "json@ietf.org" <json@ietf.org>
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 01:13:36 -0000

On Sun, May 1, 2016 at 4:30 PM, Martin J. Dürst <duerst@it.aoyama.ac.jp>
wrote:

> Hello Tim,
>
> Sorry for playing the devil's advocate, but asking the same for XML would
> give a lot of different opinions. I wouldn't expect the schema landscape
> (if it developed) to be much different, because there's a large span
> between simplicity and expressiveness that can be covered, and a lot of
> notational choices.
>

​Hey Martin, I think the evidence is against you on this.  Everyone I know
working in XML uses RelaxNG when they think they need a formal
specification - it’s very polished, and the fact that there’s an excellent
free validator written by James Clark is another really good argument.   On
the other hand, if you want to run a bunch of different tests ad-hoc tests
against some XML and get useful error messages, Schematron is super handy.
I don’t know anyone who seriously uses XSD for any new work.  ​
​

> ​​
> In addition to that, many people use JSON because they don't want to use
> XML (if they don't have any actual experience, they at least heard that
> it's somehow "problematic", and that often extends to schemata). So the
> ​​
> ​​
> JSON's users tendency seems to be to try and avoid schemata.
>
​
I agree.  ​I also think you probably should’t use XML unless you are doing
something really document-flavored, and most people aren’t.  ​I also find
that a lot of apps, perhaps most, don’t benefit that much from schemas.

I’m currently trying to specify a DSL rather than an API, and I think
having a good schema language/toolset would make my life easier :(

​​

​​


>
> Regards,   Martin.
>



-- 
- Tim Bray (If you’d like to send me a private message, see
https://keybase.io/timbray)