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

From: Carsten Bormann <[email-masked]>
Date: Thu, 1 Nov 2012 08:36:29 +0100

On Nov 1, 2012, at 07:24, "Manger, James H" <[email-masked]> 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.