Re: [Json] Schemas & so on

Tim Bray <> Mon, 02 May 2016 01:13 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C51F912B02F for <>; Sun, 1 May 2016 18:13:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.599
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: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 99e2bIS_EJQ8 for <>; Sun, 1 May 2016 18:13:33 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:400d:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id B12B512B015 for <>; Sun, 1 May 2016 18:13:33 -0700 (PDT)
Received: by with SMTP id x7so68048920qkd.3 for <>; Sun, 01 May 2016 18:13:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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;; 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 with SMTP id x65mr31338180qke.184.1462151612823; Sun, 01 May 2016 18:13:32 -0700 (PDT)
MIME-Version: 1.0
Received: by with HTTP; Sun, 1 May 2016 18:13:13 -0700 (PDT)
X-Originating-IP: []
In-Reply-To: <>
References: <> <>
From: Tim Bray <>
Date: Sun, 1 May 2016 18:13:13 -0700
Message-ID: <>
To: =?UTF-8?Q?Martin_J=2E_D=C3=BCrst?= <>
Content-Type: multipart/alternative; boundary=94eb2c060f0c7dae520531d1b31d
Archived-At: <>
Cc: "" <>
Subject: Re: [Json] Schemas & so on
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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 <>

> 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