Re: [apps-discuss] JSON Schema considered harmful

Mark Nottingham <mnot@mnot.net> Thu, 20 September 2012 20:05 UTC

Return-Path: <mnot@mnot.net>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B5D1D21E804B for <apps-discuss@ietfa.amsl.com>; Thu, 20 Sep 2012 13:05:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.377
X-Spam-Level:
X-Spam-Status: No, score=-104.377 tagged_above=-999 required=5 tests=[AWL=-1.778, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E26YY3uMfRbO for <apps-discuss@ietfa.amsl.com>; Thu, 20 Sep 2012 13:05:18 -0700 (PDT)
Received: from mxout-07.mxes.net (mxout-07.mxes.net [216.86.168.182]) by ietfa.amsl.com (Postfix) with ESMTP id BD67321E803A for <apps-discuss@ietf.org>; Thu, 20 Sep 2012 13:05:18 -0700 (PDT)
Received: from [172.30.66.198] (unknown [72.247.151.14]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id D2CC922E25D; Thu, 20 Sep 2012 16:05:11 -0400 (EDT)
Content-Type: text/plain; charset="windows-1252"
Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <CAHBU6iupyZEhENRVYJ2sMNk79RSZbOVAawr6vP42uzNyO0z+Nw@mail.gmail.com>
Date: Thu, 20 Sep 2012 13:05:11 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <77AFECFB-F63A-457F-9C7F-F715315C0651@mnot.net>
References: <CAMm+LwjYj0gd3Cxjj8WFcLy-zgBwfVDCPaRGcNSgOHD9m_07yw@mail.gmail.com> <999913AB42CC9341B05A99BBF358718D01DF0684@FIESEXC035.nsn-intra.net> <CAK3OfOgU-Kepre2Z2dg_S8DAVCU413SRvuWMvJcC3BmE0BjNbQ@mail.gmail.com> <505B43B3.7050503@berkeley.edu> <CAHBU6iupyZEhENRVYJ2sMNk79RSZbOVAawr6vP42uzNyO0z+Nw@mail.gmail.com>
To: Tim Bray <tbray@textuality.com>
X-Mailer: Apple Mail (2.1498)
Cc: apps-discuss@ietf.org
Subject: Re: [apps-discuss] JSON Schema considered harmful
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Sep 2012 20:05:19 -0000

On 20/09/2012, at 9:53 AM, Tim Bray <tbray@textuality.com> wrote:

> I believe:
> - ASN.1 has been bypassed by history and has truly horrible tooling. Just don’t go there.
> - If you’re interchanging documents, use XML; if (much more common) you’re interchanging data structures, use JSON.
> - Do not use multiple syntaxes for the same protocol. Pick one of XML or JSON and stick with it.
> - The most important thing in defining a protocol is good clean comprehensible human-readable prose.
> - All the protocols I’ve ever seen have important constraints that can’t be expressed usefully in declarative schema languages.
> - Therefore, the next most important thing is an automated validator/test-suite.
> - A schema is a nice-to-have.
> - If you’re in XML and want schema-ware, use RelaxNG. For an example, see RFC4287.
> - If your protocol is JSON, investment in a validator/test-suite has much higher ROI than chasing schema unicorns.

+1; somebody please give this a BCP#.

--
Mark Nottingham
http://www.mnot.net/