Re: [apps-discuss] draft-ietf-appsawg-json-pointer escape characters

Julian Reschke <julian.reschke@gmx.de> Wed, 27 June 2012 07:19 UTC

Return-Path: <julian.reschke@gmx.de>
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 ACD4311E8108 for <apps-discuss@ietfa.amsl.com>; Wed, 27 Jun 2012 00:19:46 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.599
X-Spam-Level:
X-Spam-Status: No, score=-106.599 tagged_above=-999 required=5 tests=[AWL=-4.000, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H8nwjYqlDmiU for <apps-discuss@ietfa.amsl.com>; Wed, 27 Jun 2012 00:19:46 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id 85B5411E8105 for <apps-discuss@ietf.org>; Wed, 27 Jun 2012 00:19:45 -0700 (PDT)
Received: (qmail invoked by alias); 27 Jun 2012 07:19:43 -0000
Received: from unknown (EHLO [42.1.1.153]) [192.147.117.12] by mail.gmx.net (mp038) with SMTP; 27 Jun 2012 09:19:43 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+Du1tGenqD7wOMq0Q25l1VukENCkhwMqFBcCxiF3 SCxmQRYJyA0ohT
Message-ID: <4FEAB40D.3010607@gmx.de>
Date: Wed, 27 Jun 2012 09:19:41 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
MIME-Version: 1.0
To: "Paul C. Bryan" <pbryan@anode.ca>
References: <4F86F5E9.1040202@gmx.de> <1334247691.2570.8.camel@neutron>
In-Reply-To: <1334247691.2570.8.camel@neutron>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: apps-discuss@ietf.org
Subject: Re: [apps-discuss] draft-ietf-appsawg-json-pointer escape characters
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: Wed, 27 Jun 2012 07:19:46 -0000

On 2012-04-12 18:21, Paul C. Bryan wrote:
> This takes us back to a previous version of JSON Pointer
> <http://tools.ietf.org/html/draft-pbryan-zyp-json-pointer-02>, which in
> fact did use URI escaping of %2F to distinguish between the '/' token
> delimiter and a '/' character within a token. IIRC, the objections that
> lead us to change were:
>
> 1. It requires URI decoding logic in non-URI-processing code (e.g. when
> pointers are used in JSON strings rather than in URI fragment
> identifiers). This has always been a somewhat weak argument, IMO.

The way you state is slightly misleading. You don't need URI decoding 
logic; you just need percent-decoding logic (which is only small part of 
URI parsing). And you need *some* kind of unescaping anyway, so I don't 
see the material difference...

> 2. Some URI parsers normalize the URI (i.e. expand %2F into '/') before
> any JSON Pointer parsing code can get a chance to see it.

Again; don't use a URI parser. Just %-unescape.

> In response to this, I went down the path of using a single escape
> character. If we can overcome these objections, I'd be happy to
> entertain returning to URI escaping.

I think it would be worthwhile to do.

Best regards, Julian