Re: [apps-discuss] JSON Schema considered harmful

SM <sm@resistor.net> Thu, 20 September 2012 20:52 UTC

Return-Path: <sm@resistor.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 3EE8821E805F; Thu, 20 Sep 2012 13:52:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.587
X-Spam-Level:
X-Spam-Status: No, score=-102.587 tagged_above=-999 required=5 tests=[AWL=0.012, 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 87nOn8CRpCiC; Thu, 20 Sep 2012 13:52:34 -0700 (PDT)
Received: from mx.ipv6.elandsys.com (mx.ipv6.elandsys.com [IPv6:2001:470:f329:1::1]) by ietfa.amsl.com (Postfix) with ESMTP id 9331321E803A; Thu, 20 Sep 2012 13:52:34 -0700 (PDT)
Received: from SUBMAN.resistor.net (IDENT:sm@localhost [127.0.0.1]) (authenticated bits=0) by mx.elandsys.com (8.14.5/8.14.5) with ESMTP id q8KKqSNn016508; Thu, 20 Sep 2012 13:52:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=opendkim.org; s=mail2010; t=1348174353; bh=vBN6T6tn3UBzQ7i13Y3y472HRcjcr/K/xrsMMnwv7bo=; h=Date:To:From:Subject:Cc:In-Reply-To:References; b=V88/r051ca6etoJiydkgGW4cXxZkMQ4odTufetBubNs/RTqcYpUNUqiAhF/tm+zXU c9GiN95uNygcsCvxpXlYu8oVyDJOo9C4duTio/OPXdZDXp9ufX6CHRBYweevG4bpyk RhU7NOgEoNUSywrjQEHJNebMR0yYtMeq6lnGqmRc=
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=resistor.net; s=mail; t=1348174353; i=@resistor.net; bh=vBN6T6tn3UBzQ7i13Y3y472HRcjcr/K/xrsMMnwv7bo=; h=Date:To:From:Subject:Cc:In-Reply-To:References; b=ACC5/0w48NHVm7VhVC3QjarYA8/6KmtBgeiJ1Gt9ZB0EZo7uqUSGdxXgc64EVD2dT Ogd5l+ZHROLMJ4V8dPGFE+TM+ZEyL7DfL/9hwE5SphTBPG7npw0AtiyKl2Krj05cI1 OW3CY9n8xUVhMohmzlcOE1MLb/+j/uYruS/Z8DlA=
Message-Id: <6.2.5.6.2.20120920132829.0a17be88@resistor.net>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.5.6
Date: Thu, 20 Sep 2012 13:51:05 -0700
To: Tim Bray <tbray@textuality.com>
From: SM <sm@resistor.net>
In-Reply-To: <CAHBU6iupyZEhENRVYJ2sMNk79RSZbOVAawr6vP42uzNyO0z+Nw@mail.g mail.com>
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>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format="flowed"
Cc: iab@iab.org, 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:52:35 -0000

Hi Tim,

[Cc to IAB.  Please drop it if the thread is willfully wild.]

At 09:53 20-09-2012, Tim Bray wrote:
>I gave a preso at IETF70 in Vancouver a few years ago which is 
>advertised as being XML-centric, but has (I think) useful things to 
>say about plain-text/binary/ASN.1/JSON/XML, and discusses about the 
>proper place of schemas: http://www.ietf.org/proceedings/70/slides/xmltut-0.pdf

I found the presentation informative.

>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.

It might help to have a discussion of the above as part of an IAB document.

Regards,
-sm