Re: [apps-discuss] JSON Schema considered harmful

Phillip Hallam-Baker <hallam@gmail.com> Wed, 19 September 2012 21:28 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 80A2821E8042 for <apps-discuss@ietfa.amsl.com>; Wed, 19 Sep 2012 14:28:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.641
X-Spam-Level:
X-Spam-Status: No, score=-3.641 tagged_above=-999 required=5 tests=[AWL=-0.643, BAYES_00=-2.599, HTML_MESSAGE=0.001, J_CHICKENPOX_62=0.6, 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 mCgn6m5TJIrp for <apps-discuss@ietfa.amsl.com>; Wed, 19 Sep 2012 14:28:39 -0700 (PDT)
Received: from mail-oa0-f44.google.com (mail-oa0-f44.google.com [209.85.219.44]) by ietfa.amsl.com (Postfix) with ESMTP id 1340021E8034 for <apps-discuss@ietf.org>; Wed, 19 Sep 2012 14:28:39 -0700 (PDT)
Received: by oagn5 with SMTP id n5so1065211oag.31 for <apps-discuss@ietf.org>; Wed, 19 Sep 2012 14:28:38 -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=EriydpaF90YMEQhIogoY2MEHgC/gUkzRTy5D+k/VslM=; b=pfWEsGXcEQZSgantJMB2/MOLHmKck2Rx24LjfNs+rBrHnzbChTRWT+4TROgPMSZLjz JbrhxdfVQOHaUhFnYMZthMUgL4AQSC0q/hLDbGN4hECNV9ACrInPfg4iF7GQ/EutlsmK xFvgcJCGtqWalYn2OhZdGyL7ACvn+D0+iTT8zZlmxyZ8rVdj/C8b2Rb18jXa6YSnV+id VpW5LqhstBZOnq6inhHyAfl+oKIqHA09nOwGvTaWmZBwo/jWWD/4bo0aGyHl9luxkYNW IicZJFYyia2qchifX9vEXCQCOSaFNSkqITokmRzccYaT6iv0ZDX3jv9IO1yTM2LcjVrE 0Twg==
MIME-Version: 1.0
Received: by 10.60.29.72 with SMTP id i8mr4008110oeh.26.1348090118626; Wed, 19 Sep 2012 14:28:38 -0700 (PDT)
Received: by 10.76.29.50 with HTTP; Wed, 19 Sep 2012 14:28:38 -0700 (PDT)
In-Reply-To: <CALcybBDkOOfWq-qzR-6mtU8TULcp4BfS0h=WRKJZDSh+G8M9zw@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> <CAMm+LwgQLc8v+V7JhEr4zEw37e0ovrUkFy0RZKOszg1FbkMjeA@mail.gmail.com> <CALcybBDkOOfWq-qzR-6mtU8TULcp4BfS0h=WRKJZDSh+G8M9zw@mail.gmail.com>
Date: Wed, 19 Sep 2012 17:28:38 -0400
Message-ID: <CAMm+LwgNZuLYvyhayA2JQtH36e05HJWbdkKUt6yei10p5p-XRA@mail.gmail.com>
From: Phillip Hallam-Baker <hallam@gmail.com>
To: Francis Galiegue <fgaliegue@gmail.com>
Content-Type: multipart/alternative; boundary="e89a8fb1f806a55b9b04ca14b057"
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 21:28:40 -0000

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

> On Wed, Sep 19, 2012 at 9:14 PM, Phillip Hallam-Baker <hallam@gmail.com>
> wrote:
> > 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].
> >
>
> There is no maxOccurs, no minOccurs. Where on earth did you see that?
>

http://tools.ietf.org/html/draft-zyp-json-schema-03

    5.13 <http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.13>.
minItems . . . . . . . . . . . . . . . . . . . . . . . . . 11
<http://tools.ietf.org/html/draft-zyp-json-schema-03#page-11>
     5.14 <http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.14>.
maxItems . . . . . . . . . . . . . . . . . . . . . . . . . 11
<http://tools.ietf.org/html/draft-zyp-json-schema-03#page-11>


5.13 <http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.13>.
 minItems

   This attribute defines the minimum number of values in an array when
   the array is the instance value.
5.14 <http://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.14>.
 maxItems

   This attribute defines the maximum number of values in an array when
   the array is the instance value.


That would seem to be the same as the XML Schema constraints only someone
changed the name.

No, you decidedly DID NOT make even an ATTEMPT to read the proposed
> specifications. It's in the README.md on the main page, damnit!


I read the Internet draft. If you are refering to a different spec then we
have an even bigger problem.



> > The spec replicates XML Schema in JSON.
>
> Yet another proof of my statement above.
>
> Read what is proposed before making any comments, and if you have any
> _constructive_ criticism, I'd be glad to hear it.
>
> Not before.



I think that you folk are giving a good idea a bad name here.

You are producing the ADA of schema languages.


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