Re: [apps-discuss] JSON Schema considered harmful

Francis Galiegue <fgaliegue@gmail.com> Wed, 19 September 2012 17:48 UTC

Return-Path: <fgaliegue@gmail.com>
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 4017F21F8469 for <apps-discuss@ietfa.amsl.com>; Wed, 19 Sep 2012 10:48:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.483
X-Spam-Level:
X-Spam-Status: No, score=-4.483 tagged_above=-999 required=5 tests=[AWL=1.116, BAYES_00=-2.599, GB_I_LETTER=-2, RCVD_IN_DNSWL_LOW=-1]
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 dNzUmysSafl8 for <apps-discuss@ietfa.amsl.com>; Wed, 19 Sep 2012 10:48:53 -0700 (PDT)
Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id 5C25421F8467 for <apps-discuss@ietf.org>; Wed, 19 Sep 2012 10:48:53 -0700 (PDT)
Received: by vcbfo14 with SMTP id fo14so1590457vcb.31 for <apps-discuss@ietf.org>; Wed, 19 Sep 2012 10:48:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=lkb8A5MjMTcTxzkD+QG/mDmqFZ+P+5/x+tuX32EJPi4=; b=c3HfodQ6yUMteJul4DvmayIKR4xWIN3h2/n/kb8p/tDP0D32LJDZlK2z/Pu+s7yQh3 Yq5dLZnnL6ghKdnzrGGUi9YoEP8nvoXI/6VLjBOenz67uapj8mhxLynkTOiuKN8dpKHR sk78YD3MvdCFT/a4nb/d9+y6Os+hii8XFXhLggSXEVwN9TMSqOfi+sh7tP88J6br7FLh 2/tNaFJLtFhVClxSqh0zS+lmOH/p8mVLWpNKymJEJ8bkuemap0U7qpWfCJDsjcfDxUon hlJFmFDMgboxgWhUu4Cl0RyoZiXZqNgmzKMATNEFtNaPzX8GKJ24z/FPQoQeJkAXIyBH 0A6Q==
MIME-Version: 1.0
Received: by 10.220.16.9 with SMTP id m9mr2281840vca.72.1348076932769; Wed, 19 Sep 2012 10:48:52 -0700 (PDT)
Received: by 10.52.23.103 with HTTP; Wed, 19 Sep 2012 10:48:52 -0700 (PDT)
In-Reply-To: <CAMm+LwjYj0gd3Cxjj8WFcLy-zgBwfVDCPaRGcNSgOHD9m_07yw@mail.gmail.com>
References: <CAMm+LwjYj0gd3Cxjj8WFcLy-zgBwfVDCPaRGcNSgOHD9m_07yw@mail.gmail.com>
Date: Wed, 19 Sep 2012 19:48:52 +0200
Message-ID: <CALcybBCqAMLi8v61u1+oPpHaMpHrK4ufUm6fUUyMb8XMmz8JSg@mail.gmail.com>
From: Francis Galiegue <fgaliegue@gmail.com>
To: Phillip Hallam-Baker <hallam@gmail.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: "apps-discuss@ietf.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: Wed, 19 Sep 2012 17:48:54 -0000

On Wed, Sep 19, 2012 at 7:30 PM, Phillip Hallam-Baker <hallam@gmail.com> wrote:
> One of the biggest mistakes that was made in the XML world was to allow one
> group of authors to develop a specification and call it 'XML Schema'. I
> think we are at risk of making the same mistake here.
>
> The more I hear about this effort, the less I like it. The approach seems to
> be needlessly complex for a start. There should be no need to have a pointer
> structure in a modern data modelling language, none. C# and Java don't use
> pointers, so why are they needed in JSON Schema?
>

OK, sorry, but that is a _very limited view of JSON Schema_.

JSON Schema was there _far_before the GitHub group came into the
picture, and FYI, JSON Reference and JSON Pointer came into light
_before the GitHub group took over_. Go read both the JSON Reference
and JSON Pointer I-Ds: do you see my name in them as an author? NO.
Only as a side note for JSON Reference because I highlighted the
dangers of a loop.

And please get a grip: before you say the approach is "needlessly
complex", have a look at what is being done. It is _precisely_ because
JSON Schema needs input that no drafts are submitted at the moment.
They are still in the process of being written.

And JSON Schema, even in its latest incarnation, is used: consider the
Google discovery API.

>
> Using a schema to develop a protocol is a very good idea but each and every
> schema language I have had to use has been botched. XML schema has two
> separate type systems. ASN.1 schema is arcane. We must not let that happen
> to JSON.
>

Go read the proposed specs. Do you see ASN.1 anywhere?

Link: https://github.com/json-schema/json-schema

> It should be possible to have a schema language that is essentially language
> neutral and encoding neutral.

Yes, and that is _precisely_ what the GitHub group is aiming for. And
you contradict yourself ohsomuch by saying that dot should be
preferred to solidus, for one.

> Pretty much every programming language in
> current use has the same set of intrinsic types (bytes, int16, int32, int64,
> strings (unicode), chars (unicode), real32, real64, boolean), and at least
> one form of enumerated collection (arrays, lists, sets). For protocol design
> it is very useful to add in standard representations for Binary and DateTime
> intrinsict types as base64 encoded strings are easier to deal with than
> arrays of decimal bytes and we already have an IETF string representation
> for time.
>

You obvioulsy haven't read neither the past nor the present.

[...]
>
> Where the XML Schema effort went wrong was they tried to support every
> feature of DTDs and they gave the schema designer the ability to map a data
> structure onto multiple different encodings. Which is pretty weird. Making
> standards is the process of making design choices that don't matter.
> Providing multiple ways to serialize the same data structure is a harmful
> option.
>

Oh dear. You really HAVE NOT read anything of the work being done by
the GitHub organization, have you?

Schema, Pointer. Those are just names. Please go carefully read the
current productions at said organization. I certainly DO NOT want to
replicate XSD. XSD and LSD have only one letter apart, and I, and the
GitHub organization, DO NOT want to go there.

Sorry for being so blunt, but I cannot stand this kind of "feedback"
from people who DO NOT EVEN TRY AND SEE WHAT IS BEING DONE.

-- 
Francis Galiegue, fgaliegue@gmail.com
JSON Schema: https://github.com/json-schema
"It seems obvious [...] that at least some 'business intelligence'
tools invest so much intelligence on the business side that they have
nothing left for generating SQL queries" (Stéphane Faroult, in "The
Art of SQL", ISBN 0-596-00894-5)