Re: [Json] Schemas & so on

Erik Wilde <> Sun, 01 May 2016 23:47 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 1F10012D54A for <>; Sun, 1 May 2016 16:47:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.791
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: (amavisd-new); dkim=neutral reason="invalid (public key: not available)"
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Ob2FGxZX_-N9 for <>; Sun, 1 May 2016 16:47:29 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 1C1E412D545 for <>; Sun, 1 May 2016 16:47:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;; 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 ([]:60614 helo=[]) by with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86_1) (envelope-from <>) id 1ax15E-0008D8-4s; Sun, 01 May 2016 19:47:28 -0400
To: =?UTF-8?Q?Martin_J._D=c3=bcrst?= <>, Tim Bray <>, "" <>
References: <> <>
From: Erik Wilde <>
Message-ID: <>
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: <>
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 -
X-AntiAbuse: Original Domain -
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain -
X-Get-Message-Sender-Via: authenticated_id:
Archived-At: <>
Subject: Re: [Json] Schemas & so on
X-Mailman-Version: 2.1.17
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: 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.



erik wilde | |
            |    |
            |    |