Re: [Json] Counterproposal #2 on work items

Francis Galiegue <fgaliegue@gmail.com> Wed, 20 February 2013 19:41 UTC

Return-Path: <fgaliegue@gmail.com>
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 2DEE821F875A for <json@ietfa.amsl.com>; Wed, 20 Feb 2013 11:41:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level:
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, 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 t86iaOSoCMn7 for <json@ietfa.amsl.com>; Wed, 20 Feb 2013 11:41:39 -0800 (PST)
Received: from mail-ea0-f169.google.com (mail-ea0-f169.google.com [209.85.215.169]) by ietfa.amsl.com (Postfix) with ESMTP id 5129521F8716 for <json@ietf.org>; Wed, 20 Feb 2013 11:41:39 -0800 (PST)
Received: by mail-ea0-f169.google.com with SMTP id d13so3704382eaa.28 for <json@ietf.org>; Wed, 20 Feb 2013 11:41:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=nVZ6DVERuJnufedJvEt11kP+kMUBhXDUDKKnvGBsWh0=; b=EmlnaBYq9YqdaEgz+gwMLePnOuiVraQEkGx+lz1d9YIuOz3vswbIJimpiLkFnTSimm vLDyikJsnVWH78/9OpGlDPJRjNUCDNsfh61dmqm24Wuk9UQZAEwDgDg5AUddM/ZQoZ8t iaxqt+7Cv1j1ayfloNYR4mi2GF3P4K2jkT0LYsUrH7uWLrOQz6vZvXeGelxVM/pr+La8 FDiFIvZ/5dU137zOvjmDYArv3Mivwe/xuH2UY+sNiooMkbNpeRxlY2vYegJUDAewfOlp Bg1dqeGR19BN1ep0v+gHdAUdPFClPHhwKkSeifzovS/7/t1dLBPlg7Y2rlCniM3zCLYo OEgQ==
MIME-Version: 1.0
X-Received: by 10.14.183.67 with SMTP id p43mr71953287eem.10.1361389298380; Wed, 20 Feb 2013 11:41:38 -0800 (PST)
Received: by 10.14.1.7 with HTTP; Wed, 20 Feb 2013 11:41:38 -0800 (PST)
In-Reply-To: <CAHBU6isrzwVwYcvucFrQjO=wSbp3S9f=CLXyU_8BznTpGZGSTQ@mail.gmail.com>
References: <CAHBU6isrzwVwYcvucFrQjO=wSbp3S9f=CLXyU_8BznTpGZGSTQ@mail.gmail.com>
Date: Wed, 20 Feb 2013 20:41:38 +0100
Message-ID: <CALcybBCCtzxzZ2KLN83JnhJBkWe_WTMmKpo6ZcudcEgmL7XHdQ@mail.gmail.com>
From: Francis Galiegue <fgaliegue@gmail.com>
To: Tim Bray <tbray@textuality.com>
Content-Type: text/plain; charset=UTF-8
Cc: "json@ietf.org" <json@ietf.org>
Subject: Re: [Json] Counterproposal #2 on work items
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Discussion related to JavaScript Object Notation \(JSON\)." <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/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: Wed, 20 Feb 2013 19:41:40 -0000

On Wed, Feb 20, 2013 at 7:01 PM, Tim Bray <tbray@textuality.com> wrote:
[...]
> - always make the top-level construct an object

Why?

I have the totally opposite view -- right now only arrays and objects
are dubbed as legal JSON texts. And I have never seen a parser raise
an error if it were fed with anything else -- nor fail to produce
anything else, for that matter.

Restricting the top level construct to objects and arrays is "bad"
enough, but restricting it even more? I think the _opposite_ should be
done. JSON is flexible, restricting its flexibility would be a mistake
imho.

-- 
Francis Galiegue, fgaliegue@gmail.com
Try out your JSON Schemas: http://json-schema-validator.herokuapp.com