Re: [apps-discuss] JSON Schema considered harmful

Phillip Hallam-Baker <hallam@gmail.com> Wed, 19 September 2012 19:14 UTC

Return-Path: <hallam@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 6EF6021F8551 for <apps-discuss@ietfa.amsl.com>; Wed, 19 Sep 2012 12:14:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.95
X-Spam-Level:
X-Spam-Status: No, score=-3.95 tagged_above=-999 required=5 tests=[AWL=-0.352, BAYES_00=-2.599, HTML_MESSAGE=0.001, 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 KCGWkXAsd+I2 for <apps-discuss@ietfa.amsl.com>; Wed, 19 Sep 2012 12:14:06 -0700 (PDT)
Received: from mail-ob0-f172.google.com (mail-ob0-f172.google.com [209.85.214.172]) by ietfa.amsl.com (Postfix) with ESMTP id D65CF21F847C for <apps-discuss@ietf.org>; Wed, 19 Sep 2012 12:14:05 -0700 (PDT)
Received: by obbwc20 with SMTP id wc20so1558974obb.31 for <apps-discuss@ietf.org>; Wed, 19 Sep 2012 12:14:01 -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; bh=8Go7RGuYPjlX0VC4NqRyCJ3eQV2ajLZXd/1fHD33P1s=; b=iDCH4UREUe1cWkVAu4jnvcdtm7mYmWfzfthiRQjext5PExrzOIBNqIVoD7Lm4NpaUM Wf/KlvLgZ2iS76ETDpPvhGimaf0IX4dfIf55FYFjFxledzumAOmCGI8mJzdn3G6YuKE1 dydExRhIggFstg9k2aeROzE2O1CFqZr7quPfrR4Lq9O81cYhxpFNIxtSEPacSdopEu3l DQI5ta60HkCgOVSDisJMVh5leqPmVtrLEJA6yjPn0riEP8I7eb9jiLL46rm6vINFmExX Zobkw74XA4p3TXWZHq6CPU9zG1ZNOPXjckFS8Aeq4Aowyxs1Ty+D+FrWdi0Lz0Idh5vm qHqw==
MIME-Version: 1.0
Received: by 10.60.170.229 with SMTP id ap5mr3647141oec.101.1348082041528; Wed, 19 Sep 2012 12:14:01 -0700 (PDT)
Received: by 10.76.29.50 with HTTP; Wed, 19 Sep 2012 12:14:01 -0700 (PDT)
In-Reply-To: <CALcybBCBScuO797yBmY3c_wRUa98=DYwN2rXXbq41pE2GHK4vw@mail.gmail.com>
References: <CAMm+LwjYj0gd3Cxjj8WFcLy-zgBwfVDCPaRGcNSgOHD9m_07yw@mail.gmail.com> <CALcybBCqAMLi8v61u1+oPpHaMpHrK4ufUm6fUUyMb8XMmz8JSg@mail.gmail.com> <CAMm+LwiyohqhRA+m3M0ViSkt74q3yOfUkZj8b-upc4V_qUv22g@mail.gmail.com> <CALcybBCBScuO797yBmY3c_wRUa98=DYwN2rXXbq41pE2GHK4vw@mail.gmail.com>
Date: Wed, 19 Sep 2012 15:14:01 -0400
Message-ID: <CAMm+LwgQLc8v+V7JhEr4zEw37e0ovrUkFy0RZKOszg1FbkMjeA@mail.gmail.com>
From: Phillip Hallam-Baker <hallam@gmail.com>
To: Francis Galiegue <fgaliegue@gmail.com>
Content-Type: multipart/alternative; boundary="bcaec54b4ac036a00b04ca12cf1f"
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 19:14:07 -0000

Excuse me but you just did refer to the 'Github JSON Schema group'

And yes, I have read the purported JSON Schema spec. It is far too complex
with far too many options.

Having written protocols using schemas, I can tell you for example that you
don't need maxOccurs or minOccurs, the only options that make sense 95% of
the time are one or none [0..], exactly one [1..1], at least one
[1..MAXINT] or any [0...MAXINT].

The spec replicates XML Schema in JSON. I don't think that has any value.
If people want to have that type of validation and see value in it then
they are going to use XML Schema. The reason some of us are interested in a
redo is that we want something that is simple like JSON is simple.


On Wed, Sep 19, 2012 at 2:09 PM, Francis Galiegue <fgaliegue@gmail.com>wrote:

> On Wed, Sep 19, 2012 at 7:59 PM, Phillip Hallam-Baker <hallam@gmail.com>
> wrote:
> > You keep raising JSON Schema here referring to it as if it was a done
> deal.
> > In fact you just told me that JSON Pointer is needed by JSON Schema
> which is
> > why I said, whooa, if you need a pointer spec for a schema language then
> you
> > are doing it wrong.
> >
>
> What I say is that an unambiguous way of accessing ANY path in a JSON
> value, whatever that value is, is needed, and JSON Pointer is that.
> Try as hard as you want, I fail to see how you can do any better. I
> didn't even design that. Out of the light of pure reason, JSON Pointer
> _makes sense_.
>
> [...]
>
> > As for 'Github', isn't that a place where people start up communities? So
> > calling something the Github community makes it sound as if you have the
> > endorsement of GitHub which I am pretty sure you don't. In fact that is
> > precisely what my complaint was about. I don't think you should be
> > aggrandizing yourself by claiming the endorsement of the JSON community
> or
> > the GitHub community.
> >
> > The only organization that should be accrediting a JSON Schema or JSON
> > Pointer is the standards body for JSON which seems to now be IETF since
> ECMA
> > seem to be citing the IETF RFC as normative.
> >
> > Until there is an IETF working group set up to develop one you should
> call
> > it something else.
> >
>
> Read about the history of JSON Schema. Please.
>
> I have NEVER, EVER, pretended to have endorsement from ANYONE. The
> GitHub JSON Schema group is an ad-hoc organization aimed at reviving
> JSON Schema, and that is all there is to it. And the principles behind
> this ad-hoc organization are: collect existing uses (and there are);
> propose solutions (and there are); reach a consensus (in process); AND
> THEN submit to the IETF.
>
> Did I ever claim being backed by GitHub? No. Did I ever claim being
> backed by the IETF (what a foolish notion to begin with)? No. Do I
> claim to be working to get JSON Schema into something to be considered
> for an I-D (note, an I-D)? Definitely, yes. On behalf of all people
> involved with this organization, which is an ad-ho group of
> VOLUNTEERS.
>
> But, damnit, I have known the subject for long enough to KNOW, just
> KNOW, that addressing JSON today, in an unambiguous way, involves two
> things: JSON Reference, and JSON Pointer. However "unlikeable" JSON
> Pointer may look to people who are too used to JavaScript. JSON is NOT
> Javascript.
>
> --
> 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)
>



-- 
Website: http://hallambaker.com/