Re: [Json] Schema Requirements (Was: Re: Nudging the English-language vs. formalisms discussion forward)

"Pete Cordell" <> Thu, 20 February 2014 22:25 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 5DA251A031E for <>; Thu, 20 Feb 2014 14:25:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: 3.537
X-Spam-Level: ***
X-Spam-Status: No, score=3.537 tagged_above=-999 required=5 tests=[BAYES_50=0.8, FH_HOST_EQ_D_D_D_D=0.765, HELO_MISMATCH_COM=0.553, RDNS_DYNAMIC=0.982, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, STOX_REPLY_TYPE=0.439] autolearn=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id VXKKOshp7vCB for <>; Thu, 20 Feb 2014 14:24:58 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 63FE41A0272 for <>; Thu, 20 Feb 2014 14:24:58 -0800 (PST)
Received: (qmail 2475 invoked from network); 20 Feb 2014 22:24:13 +0000
Received: from (HELO codalogic) ( by with ESMTPSA (RC4-MD5 encrypted, authenticated); 20 Feb 2014 22:24:13 +0000
Message-ID: <7ADB5F59D5FC475CB251FF58797A873A@codalogic>
From: Pete Cordell <>
To: Nico Williams <>
References: <>
Date: Thu, 20 Feb 2014 22:24:36 -0000
MIME-Version: 1.0
Content-Type: text/plain; format="flowed"; charset="UTF-8"; reply-type="original"
X-Unsent: 1
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Vipre-Scanned: 00088B8F00683400088CDC
X-Mailer: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
Cc: Phillip Hallam-Baker <>, JSON WG <>
Subject: Re: [Json] Schema Requirements (Was: Re: Nudging the English-language vs. formalisms discussion forward)
X-Mailman-Version: 2.1.15
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: Thu, 20 Feb 2014 22:25:00 -0000

----- Original Message From: "Nico Williams"
>> What aspect do you find a PITA?  Supporting both implicit extensibility 
>> and
>> explicit extensibility is surely harder than just supporting implicit
>> extensibility?
> Let's say you're generating C structs from the schema, and a given
> type is intended to be extensible, that it's an object.  So now you
> need to decide what your parser will do when faced with names in this
> object that were not known when the C code was generated.  There's two
> options: ignore them, or make them available as a C representation of
> an object with all the unexpected names.  The latter can be important
> at times (e.g., when you're eventually going to re-encode the inputs
> and you want to preserve those unknown bits).
> So far so good.  But if you make every type extensible by default,
> then you're polluting those C structs and the generated code even if
> mostly you don't need extensibility -- this is the PITA.  IMO
> extensibility needs to be requested explicitly, but then the problem
> you run into is people forgetting to do so.

A PITA, true, but not as big a PITA as when somebody forgets it or convinces 
themselves that they're never going to need it.  In my experience change is 
the only constant in data structures!

Pete Cordell
Codalogic Ltd
C++ tools for C++ programmers,
Read & write XML in C++,