Re: [Json] Schemas & so on

Erik Wilde <erik.wilde@dret.net> Sun, 01 May 2016 23:47 UTC

Return-Path: <erik.wilde@dret.net>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1F10012D54A for <json@ietfa.amsl.com>; Sun, 1 May 2016 16:47:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.791
X-Spam-Level:
X-Spam-Status: No, score=-1.791 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, SPF_PASS=-0.001, T_DKIM_INVALID=0.01] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=dret.net
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ob2FGxZX_-N9 for <json@ietfa.amsl.com>; Sun, 1 May 2016 16:47:29 -0700 (PDT)
Received: from postoffice.gristmillmedia.com (postoffice.gristmillmedia.com [96.30.18.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1C1E412D545 for <json@ietf.org>; Sun, 1 May 2016 16:47:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dret.net; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version :Date:Message-ID:From:References:To:Subject; bh=2RURdpBB6F1j98rZ85brDS/yDQVzjmWsgyNyMx7pWr0=; b=pSHQnwB8kJZaKlIQ9bW+CU0XJf LEPkjfOcx9BCcJXX0zbviZk6l9ra6msjvMTtMA57j+hkIfHohDKqCWEZYcc075C3Oyu0XccAhbbVq I2kXau7+vPmhpzcNk6oNC/ZK/44a6W5uIJvIiCP4mXmPsAGhr5QbC+vpIHeZ0vxJvw56H5i0ORYzb G8NQwbcv2aHnsHxz1NkBTmUeHTEz9IBtnaw4YJ2cpi3ec166kz9Dv+ea2RFamcx/iQrapO7Hkg7Dh GVR0XU1zWM/ubaWWhgMaDB9cZAevlqd12uFzkAGN3pKdVmaPYljV3Tlzsnubs2Xt9G8N6O32Z4wrP dPuL+Lrw==;
Received: from 108-67-65-66.lightspeed.sntcca.sbcglobal.net ([108.67.65.66]:60614 helo=[192.168.1.77]) by postoffice.gristmillmedia.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86_1) (envelope-from <erik.wilde@dret.net>) id 1ax15E-0008D8-4s; Sun, 01 May 2016 19:47:28 -0400
To: =?UTF-8?Q?Martin_J._D=c3=bcrst?= <duerst@it.aoyama.ac.jp>, Tim Bray <tbray@textuality.com>, "json@ietf.org" <json@ietf.org>
References: <CAHBU6itCV9MXmALdKtE9-vjUPG6-6ZqdqzrmZkcEzSUysi3S-w@mail.gmail.com> <7a6edf91-30d1-383b-4548-e12b988f9467@it.aoyama.ac.jp>
From: Erik Wilde <erik.wilde@dret.net>
Message-ID: <0bd9bc8b-d3d8-4a5a-215a-cb8821846da8@dret.net>
Date: Sun, 1 May 2016 16:47:26 -0700
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.0
MIME-Version: 1.0
In-Reply-To: <7a6edf91-30d1-383b-4548-e12b988f9467@it.aoyama.ac.jp>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - postoffice.gristmillmedia.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - dret.net
X-Get-Message-Sender-Via: postoffice.gristmillmedia.com: authenticated_id: birdhouse@dret.net
X-Authenticated-Sender: postoffice.gristmillmedia.com: birdhouse@dret.net
X-Source:
X-Source-Args:
X-Source-Dir:
Archived-At: <http://mailarchive.ietf.org/arch/msg/json/nRQtI-ap61dE2K6ZO6Yb0z4u5rA>
Subject: Re: [Json] Schemas & so on
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/json/>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 01 May 2016 23:47:30 -0000

hello martin.

On 2016-05-01 16:30, Martin J. Dürst wrote:
> Sorry for playing the devil's advocate, but asking the same for XML
> would give a lot of different opinions. I wouldn't expect the schema
> landscape (if it developed) to be much different, because there's a
> large span between simplicity and expressiveness that can be covered,
> and a lot of notational choices.

yes. and XML land was/is different because often, the document models 
are complex enough that some schema really is needed, and DTDs are just 
too primitive to be useful.

but seeing the popularity of JSON in APIs and how often these also 
specify non-trivial and non-rigid "schemas", part of me thinks that 
given a language that allows to better "document" the grammar part of an 
API, some not-so-small subset of API devs/users might find that useful.

> In addition to that, many people use JSON because they don't want to use
> XML (if they don't have any actual experience, they at least heard that
> it's somehow "problematic", and that often extends to schemata). So the
> JSON's users tendency seems to be to try and avoid schemata.

to some extent, that's certainly what's happening. but part of that may 
just be that so far, there simply isn't a good language to use.

so they add a bunch of examples. which of course are not painting the 
full picture. and consumers have to look at all of them and have to 
figure out the white spots. i think there is some sweet spot to make 
that a bit less tedious, without making it so complicated/complex that 
people will get XSD shock syndrome.

cheers,

dret.

-- 
erik wilde | mailto:erik.wilde@dret.net |
            | http://dret.net/netdret    |
            | http://twitter.com/dret    |