Re: [Json] Counterproposal #2 on work items

Philipp Kewisch <kewisch@gmail.com> Wed, 20 February 2013 21:20 UTC

Return-Path: <kewisch@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 58B2C21F86F8 for <json@ietfa.amsl.com>; Wed, 20 Feb 2013 13:20:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.598
X-Spam-Level:
X-Spam-Status: No, score=-3.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, 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 kUAjJbZU74tx for <json@ietfa.amsl.com>; Wed, 20 Feb 2013 13:20:27 -0800 (PST)
Received: from mail-bk0-f42.google.com (mail-bk0-f42.google.com [209.85.214.42]) by ietfa.amsl.com (Postfix) with ESMTP id 202FA21F86F0 for <json@ietf.org>; Wed, 20 Feb 2013 13:20:26 -0800 (PST)
Received: by mail-bk0-f42.google.com with SMTP id jk7so3792371bkc.15 for <json@ietf.org>; Wed, 20 Feb 2013 13:20:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type; bh=vzRF/FRoOqh3GjJ3trpOzl0uXdJ4Djsf/nPGbMzBd9Q=; b=IM4P2MJn0LVSqYDs5d39KIzwTTYWzrrRjazMIL/Q3Wl9qxCzhyQFf3qzFzawwyrAID P7OiR7uQlatwKCuRPS235haqqokGAouCKGqL3r3uFn3G00JzEr68y/eJFlBFRo8SJOTX Z59TH0hnpb41bR9CfZ7kXHPjceQ439xN9PchedPxSQ9IufLxsHs6rQTjO6k5DBjyABxQ d6u8jksNVUBYfgRe2G2y/l+Ga6ccRu2MNPFRDWk0dOZ/TVb1Bul3IOTW/YpByjsQUEPJ +/e2L7kw4/XzQ4r/npBnbQcZIiAqUOF2DOKDtWzHGcR6IV7YATrp2UBHOZjeqBtnjJN/ HNjw==
X-Received: by 10.204.13.25 with SMTP id z25mr9161670bkz.114.1361395226023; Wed, 20 Feb 2013 13:20:26 -0800 (PST)
Received: from oskar.fritz.box (e179192205.adsl.alicedsl.de. [85.179.192.205]) by mx.google.com with ESMTPS id fy17sm15112479bkc.6.2013.02.20.13.20.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Feb 2013 13:20:25 -0800 (PST)
Message-ID: <51253E18.7090508@gmail.com>
Date: Wed, 20 Feb 2013 22:20:24 +0100
From: Philipp Kewisch <kewisch@gmail.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20130117 Thunderbird/19.0
MIME-Version: 1.0
To: json@ietf.org
References: <A723FC6ECC552A4D8C8249D9E07425A70F89B65A@xmb-rcd-x10.cisco.com>
In-Reply-To: <A723FC6ECC552A4D8C8249D9E07425A70F89B65A@xmb-rcd-x10.cisco.com>
Content-Type: multipart/alternative; boundary="------------020309060206030000080108"
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 21:20:28 -0000

I second Francis' opinion. While it might be more common to have an 
object as a root, this is by no means a best common practice without 
explaination. I'd be ok with hilighting that there is greater 
flexibility in adding new key-value type data when using an object as 
the root, but there is more than one protocol type where an array as 
root makes more sense. Specifically, any protocol that uses sequential 
data or where potential keys can have duplicate names should probably 
have an array as a root. We went through just this question when 
designing draft-kewisch-et-al-icalendar-in-json. While iCalendar may 
seem like key-value type data, these keys can show up more than once so 
using an object as the root is the wrong thing to do.

I know the question is first if its useful to work on a such problem, 
but since I might not be around to mention this when a BCP is being 
created I still wanted to mention it.

Philipp