Re: [apps-discuss] JSON pointer: disallow leading 0s in array indicies

Carsten Bormann <cabo@tzi.org> Thu, 01 November 2012 07:36 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2100921F8519 for <apps-discuss@ietfa.amsl.com>; Thu, 1 Nov 2012 00:36:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.684
X-Spam-Level:
X-Spam-Status: No, score=-106.684 tagged_above=-999 required=5 tests=[AWL=-0.435, BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 SnwptPID0mIl for <apps-discuss@ietfa.amsl.com>; Thu, 1 Nov 2012 00:36:39 -0700 (PDT)
Received: from informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) by ietfa.amsl.com (Postfix) with ESMTP id 52CC121F8514 for <apps-discuss@ietf.org>; Thu, 1 Nov 2012 00:36:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from smtp-fb3.informatik.uni-bremen.de (smtp-fb3.informatik.uni-bremen.de [134.102.224.120]) by informatik.uni-bremen.de (8.14.3/8.14.3) with ESMTP id qA17aVhn028294; Thu, 1 Nov 2012 08:36:31 +0100 (CET)
Received: from [192.168.217.105] (p54893DF3.dip.t-dialin.net [84.137.61.243]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTPSA id C80DFEA8; Thu, 1 Nov 2012 08:36:30 +0100 (CET)
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
Content-Type: text/plain; charset=iso-8859-1
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <255B9BB34FB7D647A506DC292726F6E114FFE16053@WSMSG3153V.srv.dir.telstra.com>
Date: Thu, 1 Nov 2012 08:36:29 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <0AD30956-7482-4900-9784-FEF7896B5677@tzi.org>
References: <255B9BB34FB7D647A506DC292726F6E114FFE16053@WSMSG3153V.srv.dir.telstra.com>
To: "Manger, James H" <James.H.Manger@team.telstra.com>
X-Mailer: Apple Mail (2.1499)
Cc: IETF Apps Discuss <apps-discuss@ietf.org>
Subject: Re: [apps-discuss] JSON pointer: disallow leading 0s in array indicies
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Nov 2012 07:36:40 -0000

On Nov 1, 2012, at 07:24, "Manger, James H" <James.H.Manger@team.telstra.com> wrote:

> The JSON pointer spec allows /007 as a valid pointer to the 8th item in a JSON array, in addition to /7, and /07 etc. I think we should change this to disallow leading zeros.

Absolutely -- also for the same reasons leading zeros are not allowed in JSON itself.

Important: Make it a MUST reject, or people will postel*) them in again.

Grüße, Carsten

*) Yes, this is a verb now, referring to the undesirable effect of Jon Postel's timeless robustness principle.
It works like this: People try to be robust and allow leading zeros on reception.  Other people find out that this is common and for some reason start relying on that in their senders.  Suddenly, not supporting leading zeroes becomes an interop problem.  Done: the protocol has changed itself.