Re: [Json] Nudging the English-language vs. formalisms discussion forward

Nico Williams <> Wed, 19 February 2014 17:40 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 2379C1A00B8 for <>; Wed, 19 Feb 2014 09:40:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.378
X-Spam-Status: No, score=-1.378 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 4Op07ikhPRw7 for <>; Wed, 19 Feb 2014 09:40:17 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 403E71A01CE for <>; Wed, 19 Feb 2014 09:40:16 -0800 (PST)
Received: from (localhost []) by (Postfix) with ESMTP id C6940318097 for <>; Wed, 19 Feb 2014 09:40:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed;; h= mime-version:in-reply-to:references:date:message-id:subject:from :to:cc:content-type;; bh=exGObXQR4v53TxHcvTOE ESuAItM=; b=EAZsKLCC1+Y1ndOk3wZa+eLHoyRc5y0JIzUWTSVC9G9uiB/t92KY TibkOe9gmUUEMZXUDw5i0QPfO01hkvU6t8p9cGlNzGilpp8/Oa0Al6WU83JhPlfy 2nzD+kNRzqpeJCTGMk3Jsjk/UG0BzZg0BZtdlEzFxcJVeJ7pBJtjhb0=
Received: from ( []) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: by (Postfix) with ESMTPSA id 35F08318096 for <>; Wed, 19 Feb 2014 09:40:08 -0800 (PST)
Received: by with SMTP id t61so590679wes.22 for <>; Wed, 19 Feb 2014 09:40:05 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hFsVvs1nzHe8U450NobvaARpImQuCAX6SXafE6EfymY=; b=XOQnYwRiZwL/hKIEa9nOWF116ZetYBy/Kv6ZsXOaWU+JCASM5CJ9xFc/we6VFbqBr9 chYrn65jtPsFviETpxD12xVIYpr/4TVd6L2mjAGZcDjL9TX+qb3g7eqNuqvEQTkoZFh3 iEdME20xDFiVfFuywZkiwTIKDS7inrKmYGRFTjWqybRkO3FIj2IIhn5mdTu9paNmTW2m LDByHrmUW3+dORTdsunnFvTlez4iIyeUevW2WLjmPiUbCL47Bx2jkiQoVOqNjGpltHNt 4LMKAL7xThVTZIfSlTAb+v4y77MeqsPmvC7phpdTamCNWrjzDJPgae3aazxnA64LTol7 moZA==
MIME-Version: 1.0
X-Received: by with SMTP id ef3mr2697759wib.39.1392831605824; Wed, 19 Feb 2014 09:40:05 -0800 (PST)
Received: by with HTTP; Wed, 19 Feb 2014 09:40:05 -0800 (PST)
In-Reply-To: <>
References: <> <> <> <> <>
Date: Wed, 19 Feb 2014 11:40:05 -0600
Message-ID: <>
From: Nico Williams <>
To: Tim Bray <>
Content-Type: text/plain; charset=UTF-8
Cc: Phillip Hallam-Baker <>, Paul Hoffman <>, JSON WG <>
Subject: Re: [Json] Nudging the English-language vs. formalisms discussion forward
X-Mailman-Version: 2.1.15
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: Wed, 19 Feb 2014 17:40:20 -0000

On Wed, Feb 19, 2014 at 11:30 AM, Tim Bray <> wrote:
> On Wed, Feb 19, 2014 at 9:20 AM, Nico Williams <>
> wrote:
>> My proposal is that the WG take all comers for JSON schema languages
>> as Informational and leave it at that (well, all proposals for which
>> there's enough authors and reviewers, enough interest).  That can't
>> even be an irritant for you: you can ignore them...
> No harm in that, although I also perceive little benefit.

So ignore them.  Advise against their use even.

> I think schemas can be useful (but designing good schema languages is
> horribly hard, and so easy to get wrong).

Hard?  Nah, it's just an exercise in re-inventing the same wheel
again.  XDR is really a subset of ASN.1, with different syntax, but
clearly it's possible to map XDR on ASN.1 trivially.  Ditto DCE RPC's
IDL.  And so on.

I really want any JSON schema to be expressed in JSON itself: we all
have JSON parsers, so at least the first step is done and we won't
have to worry about how difficult it is to write LALR(1) grammars for
ASN.1 or whatever.

> I think clear English prose is *essential*, the one thing a specification
> must have. Thus, schemas can be actively harmful if arguing over them
> distracts attention from crafting the prose properly.  This is particularly
> the case when the schema language is a flawed tool, which so many of them
> are.

English prose cannot be avoided.  For me it's about finding the
sweet-spot between formal language and English prose.  We could
publish code (remember SDL?) as a specification, but no one seriously
proposes _that_ (certainly not I).

> I also think that for most protocols, an open-source validator is immensely
> more useful than a schema. Validators can check semantic constraints that
> are in principle inaccessible to schema languages, especially simple ones.

What do you want to validate?  Form?  Then use schema; a form
validator not based on schema... is still a schema of sorts.

Or do you want to validate semantics?  That requires test-suites.
Perhaps we should publish test-suites, yes -- not a bad idea, except
for the enormous impact I think that would have on RFC authoring costs
and publication timelines.